Computer graphic system and method of multi-scale simulation of smoke

ABSTRACT

A multi-scale method is provided for computer graphic simulation of incompressible gases in three-dimensions with resolution variation suitable for perspective cameras and regions of importance. The dynamics is derived from the vorticity equation. Lagrangian particles are created, modified and deleted in a manner that handles advection with buoyancy and viscosity. Boundaries and deformable object collisions are modeled with the source and doublet panel method. The acceleration structure is based on the fast multipole method (FMM), but with a varying size to account for non-uniform sampling.

CROSS-REFERENCES TO RELATED APPLICATIONS

The present application is a non-provisional application of and claims the benefit and priority under 35 U.S.C. 119(e) of U.S. Provisional Application No. 62/440,067, filed Dec. 29, 2016 entitled “MULTI-SCALE VORTICLE FLUID IMPROVEMENTS,” the entire content of which is incorporated herein by reference for all purposes.

BACKGROUND

Modeling the visual detail of a moving gas can be a laborious task. The ability to control sampling can vary from method to method. Foster and Metaxas [1997] solve the Navier-Stokes equation in a uniformly voxelized grid and further propose a popular unconditionally stable model. De Witt et al. [2012] represent the velocity using the Laplacian eigenvectors as a basis for incompressible flow. The Navier-Stokes equation can also be solved in a Lagrangian frame of reference with Smoothed Particle Hydrodynamics (SPH) [Gingold and Monaghan 1977], or with a Vortex Method, obtained by taking the curl of the Navier-Stokes equation [Cottet and Koumoutsakos 2000]. Vortex Methods can store data on points [Park and Kim 2005], curves [Angelidis et al. 2006b; Weissmann and Pinkall 2010], or surfaces [Brochu et al. 2012], and can be solved with an integral, with a grid [Couet et al. 1981], or both [Zhang and Bridson 2014]. Some original approaches don't use the Navier-Stokes equation [Elcott et al. 2007], but use Kelvin's theorem. Chern et al. [2016] solve the Schrodinger equation in a grid.

To model different characteristics at different resolutions, multiple approaches can be combined and applied to a selective range of scales: Selle et al. [2005] advect vorticity carried by points and advect vorticity carried by sheets. Kim et al. [2008] advect procedurally generated detail. Pfaff et al. [2009] and Kim et al. [2012] show that the region of changing scale is located near boundaries, varying density and temperature.

In the methods that compute pressure explicitly, the boundary condition can be met as part of computing the pressure. For the boundary condition of Vortex Methods, a harmonic field may be needed, and the source and doublet panel method can be the method of choice. Panel methods are well researched in aerodynamics. An introduction of panel methods is provided by Erickson [1990]. Both the source and the doublet term may be required. Using only the source term may not prevent the flow from passing through cup-shaped colliders, as opposed to spheroid colliders for which the doublet contribution is very small. This may be the case of the single layer potential of Zhang and Bridson [2014]. Using only the doublet term may not account for colliders with changing volume, since the doublet term is not capable of generating or consuming volume. Park and Kim [2005] use vorticle panels, which also do not handle cup-shaped colliders. Also, vorticle panels may not generate or consume volume by themselves, and may induce a rotational field.

Therefore, there is a need for improved methods of computer graphic simulation of an incompressible gas.

SUMMARY

Embodiments of the present invention provide a multi-scale method for computer graphic simulation of incompressible gases in three-dimensions with resolution variation suitable for perspective cameras and regions of importance. The dynamics may be derived from the vorticity equation. Lagrangian particles may be created, modified and deleted in a manner that handles advection with buoyancy and viscosity. Boundaries and deformable object collisions may be modeled with the source and doublet panel method. The acceleration structure may be based on the fast multipole method (FMM), but with a varying size to account for non-uniform sampling. Because the dynamics of the method is voxel free, one can freely specify the voxel resolution of the output density and velocity while keeping the main shapes and timing.

These and other embodiments of the invention are described in detail below. For example, other embodiments are directed to systems, devices, and computer readable media associated with methods described herein.

A better understanding of the nature and advantages of embodiments of the present invention may be gained with reference to the following detailed description and the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A-1B show a computer graphic renderings of a smoke trail that stretches from near the camera (FIG. 1A) to the horizon (FIG. 1B), using a single simulation according to some embodiments of the present invention.

FIGS. 2A-2C illustrate the fields of a vorticle: stream field (FIG. 2A), velocity field (FIG. 2B), and vorticity field (FIG. 2C), according to some embodiments of the present invention.

FIG. 3 illustrates schematically a group of vorticles that are relatively well separated from a target point p.

FIGS. 4A-4C and 5 illustrate a fast multipole Method (FMM) of evaluating velocity field of a plurality of vorticles according to some embodiments of the present invention.

FIG. 6A illustrates 20 near vorticles that may induce a vector field.

FIGS. 6B-6E show pathlines induced by the near vorticles illustrated in FIG. 6A during one time step, for increasing numbers of time substeps using straight segment lines, from 1 time substep to 3 time substeps (FIGS. 6B-6D), and to 64 time substeps (FIG. 6E), according to some embodiments of the present invention.

FIGS. 6F-6H show pathlines induced by the near vorticles in FIG. 6A for increasing numbers of time substeps, using twists constructed using the Lie group SE(3), from 1 time substep to 3 time substeps (FIGS. 6F-6H), according to some embodiments of the present invention.

FIGS. 7A-7C illustrate the three main steps of a fast multipole method (FMM) that may be used to compute the near coefficients of a far advected field's near expansion according to some embodiments of the present invention.

FIG. 8 illustrates schematically a plurality of vorticles of various sizes that may be generated in a virtual space surrounding a camera located at p according to some embodiments of the present invention.

FIG. 9 illustrates an exemplary octree cell structure for storing vorticles according to some embodiments of the present invention.

FIGS. 10A-10B illustrate how individual vorticles inside the box (FIG. 10A) are transformed into far coefficients relative to the box's center (FIG. 10B) for evaluations outside of the 26 neighboring cells shown with a dashed line according to some embodiments of the present invention.

FIGS. 11A-11B illustrate how the far field of a cell (FIG. 11A) is translated to the parent cell (FIG. 11B) according to some embodiments of the present invention.

FIGS. 12A-12B illustrate how, to evaluate the far field of a cell inside the dashed red line (FIG. 12A), the far field is transformed into a near field (FIG. 12B) according to some embodiments of the present invention.

FIGS. 13A-13B illustrate how the near field of a cell (FIG. 13A) is translated to a child cell (FIG. 13B) according to some embodiments of the present invention.

FIGS. 14A-14B illustrate an initial position of a boundary object (e.g., a tea pot) moving into points (the lattice) (FIG. 14A), and how the harmonic field may warp the space in an incompressible and irrotational manner with a slip boundary (FIG. 14B) according to some embodiments of the present invention.

FIGS. 15A-15C illustrate a first vorticle (FIG. 15A) is stretched into a second vorticle (FIG. 15B), where the mean energy is preserved while the enstrophy changes, and the second vorticle is then resampled in an unstretched third vorticle (FIG. 15C) with the same mean energy and enstrophy as the second vorticle, according to some embodiments of the present invention.

FIG. 16 illustrates a density particle emits a ring of vorticles (red) according to some embodiments of the present invention.

FIG. 17A illustrates a constant flow moves at 10 ms⁻¹ with ν=0.1 around a static pole of radius 1 (red): the surface sheds vorticles (black arrows), according to some embodiments of the present invention.

FIG. 17B illustrates a slice of the vorticity induced by the vorticles that reveals the emergent behavior of a von Kármán vortex street according to some embodiments of the present invention.

FIGS. 18A-18E illustrate schematically a method of forming density voxel grids according to some embodiments of the present invention.

FIG. 19 is a flowchart illustrating a method of computer graphic image processing according to some embodiments of the present invention.

FIGS. 20A-20B illustrate a simulated smoke column according to some embodiments of the present invention.

FIGS. 21A-21D illustrate an example of a simulator that may take advantage of a camera frustum according to some embodiments of the present invention.

FIG. 22A illustrates how tiny vorticles (shown in white) may interact with large vorticles (shown in black) according to some embodiments of the present invention.

FIG. 22B shows the density advected using the vorticles illustrated in FIG. 22A.

FIGS. 23A-23B illustrate how the harmonic field may play the same role as the pressure term in the classic grid-based Navier-Stokes equation according to some embodiments of the present invention.

FIG. 24 is a simplified block diagram of a system for creating computer graphics imagery (CGI) and computer-aided animation that may implement or incorporate various embodiments of the present invention.

FIG. 25 is a block diagram of a computer system or information processing device that may incorporate an embodiment, be incorporated into an embodiment, or be used to practice any of the innovations, embodiments, and/or examples found within this disclosure.

FIG. 26A shows two almost exactly overlapping curves of the largest component of the left (red) and right (blue) side of Eq. (54) according to some embodiments of the present invention; FIG. 26B shows the density field ρ_(j) for r_(j)=1 and m_(j)=1 according to some embodiments of the present invention.

FIGS. 27A-27D illustrate that the integral over any triangle can be decomposed into 6 right-angle triangle integrals according to some embodiments of the present invention.

DETAILED DESCRIPTION

Embodiments of the present invention provide a multi-scale method for computer graphic simulation of incompressible gases in three-dimensions with resolution variation suitable for perspective cameras and regions of importance. The dynamics may be derived from the vorticity equation. Lagrangian particles may be created, modified and deleted in a manner that handles advection with buoyancy and viscosity. Boundaries and deformable object collisions may be modeled with the source and doublet panel method. The acceleration structure may be based on the fast multipole method (FMM), but with a varying size to account for non-uniform sampling. Because the dynamics of the method is voxel free, one can freely specify the voxel resolution of the output density and velocity while keeping the main shapes and timing.

The FMM was developed by Geengard and Rokhlin [1987] to solve the N-body problem in linear complexity. An introduction of the FMM is provided by Ying [2012]. Unlike hybrid methods, the methods disclosed herein can handle all ranges of scales in one model. Unlike SPH where small and large scales cannot overlap, the samples in these methods can overlap for all scales. Unlike grid-based methods that have a uniform sampling for the finest resolution, these methods can handle a sparse structure for all scales. Embodiments may provide: (1) a hierarchical and sparse method for free flow advection; (2) a hierarchical and sparse method for boundaries; (3) an unconditionally stable method for vorticity stretching; and (4) a new model for buoyancy.

FIGS. 1A-1B show a computer graphic renderings of a smoke trail that stretches from near the camera (FIG. 1A) to the horizon (FIG. 1B), using a single simulation according to some embodiments of the present invention.

A. Dynamic Model

To obtain the equation of dynamics, the curl operator may be applied to the following form of the Navier-Stokes equation of a Newtonian fluid:

$\begin{matrix} {{\rho\frac{d\overset{\rightarrow}{u}}{dt}} = {{\mu{\nabla^{2}\overset{\rightarrow}{u}}} + {\rho\overset{\rightarrow}{F}} - {\nabla p}}} & (1) \end{matrix}$ where {right arrow over (u)} is velocity, t is time, ρ is density, μ is viscosity, {right arrow over (F)} is external force, and p is pressure.

Assuming that μ is constant, dividing both sides of Eq. (1) by ρ, replacing

$\frac{\mu}{\rho}$ with ν, and use the identity ∇ρ/ρ=∇ log(ρ), then the following equation may be obtained:

$\begin{matrix} {{\frac{d\overset{\rightarrow}{\omega}}{dt} = {{\left( {\overset{\rightarrow}{\omega} \cdot \nabla} \right)\overset{\rightarrow}{u}} + {v\;{\nabla^{2}\overset{\rightarrow}{\omega}}} + {{\nabla{\log(\rho)}} \times \left( {\overset{\rightarrow}{F} - \frac{d\overset{\rightarrow}{u}}{dt}} \right)} + {\nabla{\times \overset{\rightarrow}{F}}}}},} & (2) \end{matrix}$ where the vorticity {right arrow over (ω)} is the curl of the velocity {right arrow over (u)}. This is the complete equation, it includes boundaries and all forces. Eq. (2) means that the vorticity {right arrow over (ω)} evolves over time by advecting particles carrying {right arrow over (ω)}, and by stretching {right arrow over (ω)} according to the velocity {right arrow over (u)}, with kinematic viscosity ν, buoyancy and boundary interaction specified by density ρ and external force {right arrow over (F)}:

$\begin{matrix} {{\overset{\rightarrow}{F}(p)} = \left\{ {\begin{matrix} {\overset{\rightarrow}{g} + \overset{\rightarrow}{e}} & {{if}\mspace{14mu} p\mspace{14mu}{outside}\mspace{14mu}{solid}\mspace{14mu}{objects}} \\ \overset{\rightarrow}{f} & {otherwise} \end{matrix},} \right.} & (3) \end{matrix}$ where {right arrow over (g)} is the constant for gravity, {right arrow over (e)} is a set of user defined external forces, and {right arrow over (f)} is the acceleration at the objects' boundaries, suitable for deformable objects. The term “advecting” may refer to “moving” (e.g., particles). Solving {right arrow over (ω)} with Eq. (2) does not involve the pressure term. Instead, the velocity {right arrow over (u)} is obtained from {right arrow over (ω)} in two parts: an advected field {right arrow over (v)} derived from {right arrow over (ω)}, and a harmonic field {right arrow over (h)} derived from {right arrow over (v)} at the boundaries: {right arrow over (u)}={right arrow over (v)}+{right arrow over (h)}  (4)

The fields {right arrow over (v)} and {right arrow over (h)} satisfy the following identities: ∇·{right arrow over (v)}=0 ∇·{right arrow over (h)}=0 ∇×{right arrow over (h)}=0  (5)

B. Advected Field

The advected field {right arrow over (v)} is the purely rotational and dynamic portion of {right arrow over (u)} that can be computed directly from {right arrow over (ω)}. It is defined with the Biot-Savart law:

$\begin{matrix} {{\overset{\rightarrow}{v}(p)} = {\frac{1}{4\pi}{\int_{x \in R^{3}}{\frac{{\overset{\rightarrow}{\omega}(x)} \times \left( {p - x} \right)}{{{p - x}}^{3}}{dx}}}}} & (6) \end{matrix}$

Eq. (6) may mean that {right arrow over (v)} is induced by a continuum of weighted rotations singular at p=x. To remove the singularity, a discrete overlapping partitioning may be used, where each element i is a vorticle. A vorticle may also be referred to as a vortex particle or a vortex blob.

A vorticle may be defined by an integrable vorticity field {right arrow over (ω)}_(i) centered at p_(i):

$\begin{matrix} {{\overset{\rightarrow}{v}(p)} = {{\frac{1}{4\pi}{\int_{x \in R^{3}}{\frac{{\overset{\rightarrow}{\omega}(x)} \times \left( {p - x} \right)}{{{p - x}}^{3}}{dx}}}} = {\Sigma_{i}{{{\overset{\rightarrow}{v}}_{i}\left( {p - p_{i}} \right)}.}}}} & (7) \end{matrix}$

A motivation to use particles instead of a topologically connected structure, such as filaments, may be to avoid the rapid entanglement occurring around objects and other filaments. A vorticle i may be associated with a vorticity field {right arrow over (ω)}_(i), a velocity field {right arrow over (v)}_(i) and a stream field {right arrow over (ψ)}_(i). The following explicit expressions may be chosen for the stream field {right arrow over (ψ)}_(i), the velocity field {right arrow over (v)}_(i), and the vorticity field {right arrow over (ω)}_(i), using

${{\xi_{i}(l)} = \frac{1}{\sqrt{r_{i}^{2} + l^{2}}}},$ size r_(i) and rotation strength {right arrow over (w)}_(i): {right arrow over (ψ)}_(i)({right arrow over (x)})=ξ_(i)(∥{right arrow over (x)}∥){right arrow over (w)} _(i) {right arrow over (v)}_(i)({right arrow over (x)})=ξ_(i)(∥{right arrow over (x)}∥)³ {right arrow over (w)} _(i) ×{right arrow over (x)} {right arrow over (ω)}_(i)({right arrow over (x)})=ξ_(i)(∥{right arrow over (x)}∥)³(2{right arrow over (w)} _(i)−3ξ_(i)(∥{right arrow over (x)}∥)² {right arrow over (x)}×({right arrow over (w)} _(i) ×{right arrow over (x)}))  (8)

FIGS. 2A-2C illustrate the fields of a vorticle: stream field (FIG. 2A), velocity field (FIG. 2B), and vorticity field (FIG. 2C) according to some embodiments, where {right arrow over (w)}_(i) is up. The fields shown in FIGS. 2A-2C satisfy the following identities: ∇×{right arrow over (ψ)}_(i)={right arrow over (ν)}_(i) ∇×{right arrow over (ν)}_(i)={right arrow over (ω)}_(i) ∇·{right arrow over (ν)}_(i)=0 ∇·{right arrow over (ω)}_(i)=0.

These functions are chosen because they are non-singular since r_(i)>0, they are smooth across {right arrow over (x)}=0, and because the vorticle's rotation strength {right arrow over (w)}_(i) is asymptotic to its vorticity {right arrow over (ω)}_(i) when decreasing r_(i). Also, a vorticle's mean energy E_(i) can have a closed form:

$\begin{matrix} {{E_{i} = {{\frac{1}{2}{\int{{{{\overset{\rightarrow}{v}}_{i}\left( \overset{\rightarrow}{x} \right)}}^{2}d\overset{\rightarrow}{x}}}} = \frac{\pi^{2}{{\overset{\rightarrow}{w}}_{i}}^{2}}{4\; r_{i}}}},} & (9) \end{matrix}$ which may be convenient for splitting a vorticle emitter's energy E among N emitted vorticles:

$\begin{matrix} {{\overset{\rightarrow}{w}}_{i} = {\frac{2}{\pi}\sqrt{\frac{{Er}_{i}}{N}}{X.}}} & (10) \end{matrix}$

The variable X is a random vector on the unit sphere, or a normalized curl of an input field. A set of vorticles induces a stream field {right arrow over (ψ)}, an advected field {right arrow over (v)} and a vorticity field {right arrow over (ω)}: {right arrow over (ψ)}(p)=Σ{right arrow over (ψ)}_(i)(p−p _(i)) {right arrow over (v)}(p)=Σ{right arrow over (v)} _(i)(p−p _(i)) {right arrow over (ω)}(p)=Σ{right arrow over (ω)}_(i)(p−p _(i))  (11)

Therefore the following identities hold true by construction: ∇×{right arrow over (ψ)}={right arrow over (v)} ∇×{right arrow over (v)}={right arrow over (ω)} ∇·{right arrow over (v)}=0 ∇·{right arrow over (ω)}=0

Multi-Scale Fast Multipole Method (FMM)

The cost of evaluating {right arrow over (v)} at every vorticle center p_(i) directly with Eq. (11) scales quadratically with the number of vorticles, and may be prohibitive for large numbers of vorticles. The fast multipole method (FMM) may provide a way to evaluate {right arrow over (v)}(p) using only the near cells of p in an octree. The FMM is a numerical technique that was developed to speed up the calculation of long-ranged forces in a N-body problem. It accomplishes this by using a multipole expansion, which allows one to group sources that lie close together and treat them as if they are a single source.

FIG. 3 illustrates schematically a group of vorticles 310 that are relatively well separated from a target point p. According to an FMM method in some embodiments, when sufficiently far away from p, the group of vorticles 310 may be approximated as a single source centered on a cell 320.

FIGS. 4A-4C and 5 illustrate schematically an FMM method of evaluating velocity field of a plurality of vorticles according to some embodiments. Assume that vorticles 410 are approximately uniformly distributed in a three-dimensional space, as illustrated in FIG. 4A. The three-dimensional space may be divided into cubical cells 420. For a target point located sufficiently far away from a cell 420, the vorticles 410 inside the cell 420 may be approximated as a single source 430 positioned at the center of the cell 420, as illustrated in FIG. 4B.

An octree cell structure may be constructed to include a plurality of octree levels. Traversing the octree up to a parent level, eight nearest neighbor child cells 420 (e.g., four in the plane of the paper and four in a plane below the plane of the paper) may be approximated as a single source 450 positioned at the center of the parent cell 440, as illustrated in FIG. 4C. This process can continue to the next parent level in a similar fashion.

In some embodiments, a cell that contains the camera position p and the cells that are direct neighbors of that cell may be referred to as near cells. All other cells may be referred to as far cells. For instance, in the example illustrated in FIG. 5, the cells included in the thick-outlined box 510 surrounding the camera position p may be referred to as near cells, and the cells outside the thick-outlined box 510 may be referred to as far cells. In some embodiments, the vorticles in the cell and in the 1-cell ring of p may be referred to as near vorticles, and all other vorticles may be referred to as far vorticles. Note that the octree may store vorticles of different sizes, and there are potentially near and far vorticles at multiple levels.

The advected field may be split into near and far fields: {right arrow over (v)}={right arrow over (v)} _(near) +{right arrow over (v)} _(far).  (12)

1. Near Advected Field

The near advected field may be evaluated by summing the velocity fields of the near vorticles, in the cell and 1-cell ring across all levels:

$\begin{matrix} {{{\overset{\rightarrow}{v}}_{near}(p)} = {\sum\limits_{i \in {{near}{(p)}}}{{\overset{\rightarrow}{v}}_{i}\left( {p - p_{i}} \right)}}} & (13) \end{matrix}$

The near field, however, can have a very large mean energy, especially near user defined vorticle emitters. Also, if r_(i) approaches 0, then {right arrow over (v)}_(i)(p_(i)) becomes infinite. For the simulation to be tolerant of any input, an advection method that handles the most extremely coiled trajectory in a single time step may be used. For that, the velocity may be replaced with a displacement constructed from the union of twists, similar to the method of Angelidis et al. [2006a]. A twist is an element of the Lie group SE(3). A twist may be constructed by combining the rotations induced by vorticles. Lie group of twists with vorticles may be used because it is known that the motion is derived from rotations. The rotations may be expressed in the Lie algebra se(3), and summed. An exponential map may be used to obtain the twist in SE(3). The following may be obtained:

$\begin{matrix} {\mspace{79mu}{{{\overset{\rightarrow}{k}}_{0} = {\Delta_{t}{\sum\limits_{i \in {{near}{(p)}}}{{{\overset{\rightarrow}{\xi}}_{i}\left( {p - p_{i}} \right)}^{2}{{\overset{\rightarrow}{\psi}}_{i}\left( {p - p_{i}} \right)}}}}}\mspace{20mu}{{\overset{\rightarrow}{k}}_{1} = {\Delta_{t}{\sum\limits_{i \in {{near}{(p)}}}{{\overset{\rightarrow}{v}}_{i}\left( {p - p_{i}} \right)}}}}{{{\overset{\rightarrow}{v}}_{near}(p)} = {\frac{1}{\Delta_{t}}\left( {{\overset{\rightarrow}{k}}_{1} + {{\overset{\rightarrow}{k}}_{0} \times \left( {{\frac{{{\overset{\rightarrow}{k}}_{0}} - {\sin\left( {{\overset{\rightarrow}{k}}_{0}} \right)}}{{{\overset{\rightarrow}{k}}_{0}}^{3}}{\overset{\rightarrow}{k}}_{0} \times {\overset{\rightarrow}{k}}_{1}} + {\frac{1 - {\cos\left( {{\overset{\rightarrow}{k}}_{0}} \right)}}{{{\overset{\rightarrow}{k}}_{0}}^{2}}{\overset{\rightarrow}{k}}_{1}}} \right)}} \right)}}}} & (14) \end{matrix}$

This method may underestimate the length of the trajectory, but converges when decreasing the time step Δ_(i) and guarantees stability. It is observed that strong vorticles induce extremely coiled pathlines in a single time step similar to the pathlines integrated with tiny steps, and also that a small number of vorticles placed on a ring moves along a straight and stable trajectory.

FIG. 6A illustrates 20 near vorticles that may induce a vector field. FIGS. 6B-6E show pathlines induced by the near vorticles illustrated in FIG. 6A during one time step, for increasing numbers of time substeps using straight segment lines (referred to as linear time steps), from 1 time substep to 3 time substeps (FIGS. 6B-6D), and to 64 time substeps (FIG. 6E), according to some embodiments of the present invention. Points are scattered with random colors. As illustrated, the quality of the advection increases rather slowly when taking linear time steps. FIGS. 6F-6H show pathlines induced by the near vorticles in FIG. 6A for increasing numbers of time substeps, using twists constructed using the Lie group SE(3), from 1 time substep to 3 time substeps (FIGS. 6F-6H), according to some embodiments of the present invention. As illustrated, using the Lie group of twists, thousands of rotations can be done in a single time step.

2. Far Advected Field

The far advected field's near expansion may be defined using the near coefficients {right arrow over (κ)}_(lmn) of the deepest cell containing p: {right arrow over (v)} _(far)(p)=Σ_(l=0) ^(l) ^(max) Σ_(m=−l) ^(l)Σ_(n=1) ^(n) ^(max) ∇(Y _(lm)(p)∥p∥ ^(n))×{right arrow over (κ)}_(lmn)  (15)

The function Y_(lm)(p) denotes the real spherical harmonics:

$\begin{matrix} {{K_{lm} = \sqrt{\frac{\left( {{2l} + 1} \right){\left( {l - {m}} \right)!}}{4{{\pi\left( {l + {m}} \right)}!}}}}{{Y_{lm}(p)} = {K_{lm}{P_{l,{m}}\left( {\cos(\phi)} \right)}\left\{ \begin{matrix} {\sqrt{2}{\cos\left( {m\;\theta} \right)}} & {{{if}\mspace{14mu} m} > 0} \\ 1 & {{{if}\mspace{14mu} m} = 0} \\ {\sqrt{2}{\sin\left( {{- m}\;\theta} \right)}} & {{{if}\mspace{14mu} m} < 0} \end{matrix} \right.}}} & (16) \end{matrix}$

The function P_(lm) denotes the associated Legendre polynomials, with Cartesian coordinates mapping to spherical coordinates as

$\left( {\theta,\phi,r} \right) = {\left( {{a\;\tan\; 2\left( {p_{y},p_{x}} \right)},{a\;{\cos\left( \frac{p_{z}}{p} \right)}},{p}} \right).}$ The first few basis functions are given in Appendix 2.

FIGS. 7A-7C illustrate the three main steps of the FMM that may be used to compute the near coefficients {right arrow over (κ)}_(lmn). First, an octree can be built where the near coefficients {right arrow over (κ)}_(lmn) of all cells are initialized to 0. Level 0 denotes the octree's root. The 189 cells that are children of the parent's neighbors but not direct neighbors may be referred to as far interacting cells. A cell's far coefficient may be computed by translating the 8 children's far coefficient (FIG. 7A). A cell's near coefficient may be computed by translating the parent's near coefficient (FIG. 7B), and transforming the 189 far interacting cells' far coefficient (FIG. 7C).

To make the algorithm multiscale, vorticles of various sizes r_(i) may be generated in a three-dimensional space according to some embodiments, as illustrated in FIG. 8. For examples, the vorticles may include small vorticles 810 and 812, medium vorticles 820, medium large vorticles 830, and large vorticles 840, 842, and 844. In FIG. 8, the point p denotes the camera position. In some embodiments, the size of each vorticle may increase as the distance from the vorticle to the camera position p increases. In some other embodiments, vorticles of various sizes may occupy a same spatial region. For instance, in the example illustrated in FIG. 8, the small vorticle 812 may be located next to the large vorticles 842 and 844.

The vorticles may be stored in the internal cells of size

$a = {2^{\lceil\frac{\log\mspace{11mu} r_{i}}{{\log\mspace{11mu} 2}\;}\rceil}.}$ FIG. 9 illustrates an exemplary cell structure. In some embodiments, the cell size a may be expressed as a=2^(−L), where

$L = \frac{\log\mspace{11mu} r_{i}}{{\log\mspace{11mu} 2}\;}$ is the level in an octree. When traversing up the octree from a child cell to a parent cell (i.e., from lower level L to higher level L−1), larger vorticles may be collected.

According to some embodiments, the steps in an FMNI method may include:

(1) Compute the far coefficients {right arrow over (μ)}_(lmn) of all cells with vorticles, as described further below and illustrated in FIGS. 10A-10B. The far interacting cells may also be allocated all the way to the root, so that steps (2) and (3) may propagate valid coefficients to the deepest cell, to cover all positions with the octree.

(2) Traverse the tree from the leaves to the root level 0, translating and accumulating the children's far coefficients {right arrow over (μ)}_(lmn) into the parent's far coefficient {right arrow over (μ)}_(l′m′n′)′, as described further below and illustrated in FIGS. 11A-11B.

(3) Traverse the tree from the root level 0 to the leaves: first, the parent's near coefficient is translated, as described further below and illustrated in FIGS. 12A-12B; second, the far interacting cells' far coefficient is transformed, as described further below and illustrated in FIGS. 13A-137B. Each far interacting cell's set of coefficients {right arrow over (κ)}_(lmn). is added to the set of coefficients stored in the current cell.

(4) After step (3), the coefficients at the leaves represent all far vorticles are then used in Eq. (15).

a) Vorticle Far Coefficients

The far advected field may be decomposed around the origin using the far coefficients {right arrow over (μ)}_(lmn):

$\begin{matrix} {{{\overset{\rightarrow}{v}}_{far}(p)} = {\sum\limits_{l = 0}^{l_{\max}}{\sum\limits_{m = {- l}}^{l}{\sum\limits_{n = 1}^{n_{\max}}{{\nabla\left( {{Y_{lm}(p)}\frac{1}{{p}^{n}}} \right)} \times {\overset{\rightarrow}{\mu}}_{lmn}}}}}} & (17) \end{matrix}$

Unlike a traditional expansion, an advantage of this expansion may be that it includes the vorticles' size. To compute the far coefficients {right arrow over (μ)}_(lmn), a far expansion of a single vorticle's stream function may be made as:

$\begin{matrix} {{{\overset{\rightarrow}{\psi}}_{i}\left( {p - p_{i}} \right)} = {{\overset{\rightarrow}{w}}_{i}{\xi_{i}\left( {p} \right)}{\sum\limits_{k}{{P_{k}\left( {\frac{p \cdot p_{i}}{{p}{p_{i}}},{\tau_{i}\left( {p} \right)}} \right)}\frac{{p_{i}}^{k}}{{p}^{k}}}}}} & (18) \end{matrix}$

This can be achieved by identifying the terms of a Taylor expansion near ε=0 of ξ_(i)(∥p−p_(i)∥)=ξ_(i)(∥p∥)(1+τ_(i)(∥p∥ε)^(−1/2), where

${{\tau_{i}(l)} = \frac{1}{1 + {r_{i}^{2}/l^{2}}}},$ and where P_(k)(z, τ) is a modified Legendre polynomial, that is, a Legendre polynomial where the ith non-zero coefficient of the largest power of z is multiplied by τ_(i) ^(k−i). The first few are:

$\begin{matrix} {{{P_{0}\left( {\alpha,\tau} \right)} = 1}{{P_{1}\left( {\alpha,\tau} \right)} = {\alpha\tau}}{{P_{2}\left( {\alpha,\tau} \right)} = {{- \frac{\tau}{2}} + \frac{3\alpha^{2}\tau^{2}}{2}}}} & (19) \end{matrix}$

This modified Legendre decomposition may be projected on the Legendre polynomials:

$\begin{matrix} {{{\overset{\rightarrow}{\psi}}_{i}\left( {p - p_{i}} \right)} = {{\overset{\rightarrow}{w}}_{i}{\sum\limits_{l}{{P_{l}\left( \frac{p \cdot p_{i}}{{p}{p_{i}}} \right)}{B_{l}\left( {{p},{p_{i}}} \right)}\mspace{14mu}{where}\text{:}}}}} & (20) \\ {{{B_{l}\left( {r,d_{i}} \right)} = {{\xi_{i}(r)}{\sum\limits_{k = l}^{\infty}{{\beta_{kl}\left( {\tau_{i}(r)} \right)}\frac{d_{i}^{k}}{r^{k}}}}}}{{\beta_{kl}(\tau)} = {\int_{- 1}^{1}{\frac{{2l} + 1}{2}{P_{l}(\alpha)}{P_{k}\left( {\alpha,\tau} \right)}d\;\alpha}}}} & (21) \end{matrix}$

A series expansion in 1/r may then be perform to obtain the radial coefficients b_(ln):

$\begin{matrix} {B_{l} = {\sum\limits_{n = 1}^{\infty}{b_{\ln}\frac{1}{r^{n}}}}} & (22) \end{matrix}$

Finally, the Legendre polynomial may be projected on the spherical harmonics to obtain the spherical coefficients y_(lm):

$\begin{matrix} {y_{lm} = {\int_{\theta = 0}^{2\pi}{\int_{\phi = 0}^{\pi}{{P_{l}\left( \frac{p_{r\;{\theta\phi}} \cdot p_{i}}{p_{i}} \right)}{Y_{lm}\left( {\theta,\phi} \right)}d\;\theta\; d\;\phi}}}} & (23) \end{matrix}$

Thus the far coefficients {right arrow over (μ)}_(lmn) of one vorticle is assembled from the radial coefficient, the spherical coefficient, and the vorticle's rotation strength {right arrow over (w)}_(i): {right arrow over (μ)}_(lmn)=y_(lm)b_(ln){right arrow over (w)}_(i)  (24) The first few far coefficients are given in Appendix 3. The far field of multiple vorticles may be obtained simply by summing the coefficients of each vorticle.

FIGS. 10A-10B illustrates how individual vorticles inside the box (FIG. 10A) are transformed into far coefficients relative to the box's center (FIG. 10B) for evaluations outside of the 26 neighboring cells shown with a dashed line. This reduction of complexity to a basis of constant size makes this method scalable. For evaluating {right arrow over (v)} outside of the octree, the far expansion of Eq. (17) is used at the root.

b) Far Coefficients Translation

FIGS. 11A-11B illustrates how the far field of a cell (FIG. 11A) is translated to the parent cell (FIG. 11B). The matching area is outlined in red. The 26 neighboring cells are shown with a dashed line. To compute the parent's far coefficients {right arrow over (μ)}_(l′m′n′) from child coefficients {right arrow over (μ)}_(lmn) relative to offset location c, a series expansion of {right arrow over (ψ)}_(far) (p+c) in 1/r can be made and projected on the translated basis Y_(l′m′). The first few are given in Appendix 4.

Since the relative spatial configuration between parent and children nodes are repeated in the octree, the translation coefficients can be precomputed, and the translation becomes a mere sum of weighted vectors. This is also the case for all other coefficients.

c) Far-to-Near Coefficients Transform

FIGS. 12A-12B illustrate how, to evaluate the far field of a cell inside the dashed red line (FIG. 12A), the far field is transformed into a near field (FIG. 12B). For far interacting cells, the far expansion coefficients {right arrow over (μ)}_(lmn) are transformed into the near expansion coefficients {right arrow over (κ)}_(l′m′n′). To compute the near coefficients {right arrow over (κ)}_(l′m′n′) of the translated far coefficient {right arrow over (μ)}_(lmn) to a new location c, a series expansion of {right arrow over (ψ)}_(far)(p+c) in r may be made and projected on the translated basis Y_(l′m′) to obtain the coefficient of the translated field. Since some of the far coefficients are zero, they simplify, and the first few are given in Appendix 5.

d) Near Coefficients Translation

The coefficients from parent nodes {right arrow over (κ)}_(lmn) can be propagated to the coefficient of children nodes {right arrow over (κ)}′_(l′m′n′), by translating the parent's coefficient to each child's center, and adding the coefficient. To compute the coefficients {right arrow over (κ)}′_(l′m′n′) of the translated coefficient {right arrow over (κ)}_(lmn) to a new location c, a series expansion of {right arrow over (ψ)}_(near)(p+c) in r can be made and projected on the translated basis Y_(l′m′) to obtain the coefficient of the translated field. They simplify and the first few are given in Appendix 6.

FIGS. 13A-13B illustrate how the near field of a cell (FIG. 13A) is translated to a child cell (FIG. 13B).

C. Harmonic Field

The harmonic field {right arrow over (h)} in Eq. (4) can be computed using the source and doublet panel method. In contrast with the coupling of grid based solvers, which solve for both pressure and boundaries simultaneously in a volume domain, the source and doublet panel method solves the boundaries' degrees of freedom on a surface domain, with a solution smoothly defined between the boundaries and infinity. Given a manifold surface defined by n triangle panels δΩ_(j) with normal {right arrow over (n)}_(j) pointing outside, field {right arrow over (h)} is defined as: {right arrow over (h)}=Σ _(j)σ_(j) ∇S _(j)+μ_(j) ∇D _(j).  (25) Each triangle induces a source panel field S_(j) and a doublet panel field D_(j), defined by surface integrals:

$\begin{matrix} {{{S_{j}(p)} = {\int_{\;}^{\;}{\int_{{\delta\Omega}_{j}}^{\;}{\frac{1}{{p - x}}{dx}}}}}{{D_{j}(p)} = {- {\int_{\;}^{\;}{\int_{{\delta\Omega}_{j}}^{\;}{{{\overset{\rightarrow}{n}}_{j} \cdot \frac{p - x}{{{p - x}}^{3}}}{dx}}}}}}} & (26) \end{matrix}$

The gradients of the source and the doublet are both irrotational and incompressible, and therefore ∇·{right arrow over (h)}=0 and ∇×{right arrow over (h)}=0. To find σ_(j) and μ_(j) such that field {right arrow over (h)} cancels field {right arrow over (v)} across all boundaries, the linear system of the direct approach can be solved by placing a control point p_(i) at the center of each panel. This produces a linear system of 2n equations with 2n variables:

$\begin{matrix} \left\{ \begin{matrix} {0 = {{\sum\limits_{j}{\sigma_{j}{S_{j}\left( p_{i} \right)}}} + {\mu_{j}{D_{j}\left( p_{i} \right)}}}} \\ {{{\overset{\rightarrow}{n}}_{i} \cdot \left( {{\overset{\rightarrow}{s}\left( p_{i} \right)} - {\overset{\rightarrow}{v}\left( p_{i} \right)}} \right)} = {{\sum\limits_{j}{\sigma_{j}{{\overset{\rightarrow}{n}}_{i} \cdot {\nabla{S_{j}\left( p_{i} \right)}}}}} + {\mu_{j}{{\overset{\rightarrow}{n}}_{i} \cdot {\nabla{D_{j}\left( p_{i} \right)}}}}}} \end{matrix} \right. & (27) \end{matrix}$ where {right arrow over (s)}(p_(i)) the velocity at the center of panel i. If the boundary isn't moving, then {right arrow over (s)}(p_(i))=0. For numerical evaluations, analytical integrals for S_(j) and ∇S_(j), D_(j) and ∇D_(j) may be used, provided in Appendices 9 and 10.

For evaluating the harmonic field {right arrow over (h)}, the harmonic field in near and far fields may be split: {right arrow over (h)}={right arrow over (h)} _(near) +{right arrow over (h)} _(far).  (28)

The panels may be stored in an octree structure similar to the one used for the advected field. Note that this can be a second octree, since vorticles sample space between colliders, whereas the panels sample the surface of the colliders, and there is generally no cell correlation between the two.

1. Near Harmonic Field

The near harmonic field may be evaluated directly by summing the harmonic fields of the near panels, in the cell and 1-cell ring across all levels, in a manner similar to Eq. (13):

$\begin{matrix} {{{\overset{\rightarrow}{h}}_{near}(p)} = {{\sum\limits_{j \in {{near}{(p)}}}{\sigma_{j}{\nabla{S_{j}(p)}}}} + {\mu_{j}{\nabla{D_{j}(p)}}}}} & (29) \end{matrix}$

FIGS. 14A-14B illustrate an initial position of a boundary object (e.g., a tea pot) moving into points (the lattice) (FIG. 14A), and how the harmonic field may warp the space in an incompressible and irrotational manner with a slip boundary (FIG. 14B).

2. Far Harmonic Field

The far harmonic field is similar to the far advected field, but instead of the curl of a field with vector coefficients, it is the gradient of a field with scalar coefficients. The near harmonic coefficients κ_(lmn) can be computed using the same FMNI algorithm, but only with 1-dimensional coefficients, and with samples on the surface: {right arrow over (h)} _(far)(p)=Σ_(l=0) ^(l) ^(max) Σ_(m=−l) ^(l)Σ_(n=1) ^(n) ^(max) κ_(lmn)∇(Y _(lm)(p)∥p∥ ^(n))  (30)

Eq. (30) is similar to Eq. (15). To derive the far coefficients, each source and doublet panel of area a_(i) may be approximated with a point:

$\begin{matrix} {{\overset{\rightarrow}{h}}_{far} = {\nabla\left( {{{\sum\limits_{j}{a_{j}\sigma_{j}\frac{1}{{p - x_{j}}}}} + {\frac{a_{j}\mu_{j}}{2ɛ}\left( {\frac{1}{{p - \left( {x_{j} - {ɛ\;{\overset{\rightarrow}{n}}_{j}}} \right)}} - \frac{1}{{p - \left( {x_{j} + {ɛ\;{\overset{\rightarrow}{n}}_{j}}} \right)}}} \right)}},} \right.}} & (31) \end{matrix}$ where the source panel is converted to a point with area a_(i) and the coefficients y_(lm) and b_(ln) are a special case of Eq. (24) with r_(j)=0. For the source located at x_(j): μ_(lmn)=a_(j)σ_(j)y_(lm)b_(ln)  (32)

The doublet produces two sources, located at x_(j)−ε{right arrow over (n)}_(j) and at x_(j)+ε{right arrow over (n)}_(j), with far coefficients:

$\begin{matrix} {{\mu_{lmn} = {\frac{a_{j}\mu_{j}}{2ɛ}y_{lm}b_{\ln}}}{\mu_{lmn} = {{- \frac{a_{j}\mu_{j}}{2ɛ}}y_{lm}{b_{\ln}.}}}} & (33) \end{matrix}$

The coefficients y_(lm) and b_(ln) are also the ones of Eq. (24). If the surface is undersampled, the discretization error can manifest itself visually as weak currents leaking in or out of boundaries, usually far from the control points and near panel edges. This issue can be reduced for inward leakage by imposing a no-through condition per point, and for outward leakage by using the maximum principle: the magnitude of the harmonic field in the entire space is bound by the harmonic field's value on the surface. Near the surface, it may be assumed that {right arrow over (n)} _(i) ·{right arrow over (u)}(p)<=argmax({right arrow over (n)} _(i)·({right arrow over (s)}(p _(i))−{right arrow over (v)}(p _(i)))).

D. Stretching

While the previous sections focus on computing (∇×)⁻¹{right arrow over (ω)}, the following sections focus on the dynamic terms in the right-hand side of Eq. (2). The term ({right arrow over (ω)}·∇){right arrow over (v)} in Eq. (2) models the stretching of vorticity, and is responsible for changing the vorticle orientation as well as introducing increasingly high frequency velocities by transferring large scale eddies to smaller scale eddies [Frisch and Kolmogorov 1995]. This term does not have an explicit analogue in Eq. (1), and comes from the expansion into partial derivatives of the acceleration's curl. It is the change of vorticity by the velocity gradient. Stretching may be measured assuming that {right arrow over (w)}_(i) and {right arrow over (ω)}(p_(i)) have the same direction, which is true for an isolated vorticle, or when r_(i)→0. As the approach taken by Zhang and Bridson [2014], two points may be displaced on either side of p_(i). Reducing this measurement to two points may be a valid approach because the flow is incompressible, and it can be safely assumed that a stretch along {right arrow over (w)}_(i) is accompanied by a corresponding squash on the plane perpendicular to {right arrow over (w)}_(i). After one time step, {right arrow over (ω)}_(i)(p_(i)) becomes {right arrow over (ω)}_(i′)(p_(i′)):

$\begin{matrix} {{{{\overset{\rightarrow}{\omega}}_{i}\left( p_{i} \right)} = {2r_{i}^{{- 3}/2}{\overset{\rightarrow}{w}}_{i}}}{{{\overset{\rightarrow}{\omega}}_{i}^{\prime}\left( p_{i}^{\prime} \right)} = {2{r_{i}^{{- 3}/2}\left( {{\overset{\rightarrow}{w}}_{i} + {\frac{\Delta_{t}{{\overset{\rightarrow}{w}}_{i}}}{r_{i}}\left( {{\overset{\rightarrow}{u}\left( q_{1} \right)} - {\overset{\rightarrow}{u}\left( q_{0} \right)}} \right)}} \right)}}}{q_{0} = {p_{i} - \frac{r_{i}{\overset{\rightarrow}{w}}_{i}}{2{{\overset{\rightarrow}{w}}_{i}}}}}{q_{1} = {p_{i} + \frac{r_{i}{\overset{\rightarrow}{w}}_{i}}{2{{\overset{\rightarrow}{w}}_{i}}}}}} & (34) \end{matrix}$

To apply this measure of stretching to a vorticle, closed-form formulas may be developed for the ellipsoidal fields of a vorticle under uniform stretching: {right arrow over (v)} _(i)({right arrow over (x)}, s)=sξ _(i)(∥σ({right arrow over (x)}, s)∥³ {right arrow over (w)} _(i) ×{right arrow over (x)} {right arrow over (ω)}_(i)({right arrow over (x)}, s)=sξ _(i)(∥σ({right arrow over (x)}, s)∥)³(2{right arrow over (w)} _(i)−3ξ_(i)(∥σ({right arrow over (x)}, s)∥)²σ({right arrow over (x)}, s ²)×({right arrow over (w)} _(i) ×{right arrow over (x)})),  (35) where

${\sigma\left( {\overset{\rightarrow}{x},s} \right)} = {\frac{1}{{{\overset{\rightarrow}{w}}_{i}}^{2}}{\left( {{{s^{{- 4}/5}\left( {\overset{\rightarrow}{x} \cdot {\overset{\rightarrow}{w}}_{i}} \right)}{\overset{\rightarrow}{w}}_{i}} + {{s^{7/10}\left( {{\overset{\rightarrow}{w}}_{i} \times \overset{\rightarrow}{x}} \right)} \times {\overset{\rightarrow}{w}}_{i}}} \right).}}$ When the stretching factor increases, it stretches {right arrow over (ω)}_(i) by a factor s along {right arrow over (w)}_(i), and squashes {right arrow over (ω)}_(i) by √{square root over (1/s)} along any direction perpendicular to {right arrow over (w)}_(i), in accordance with the deformation induced by an incompressible flow:

$\begin{matrix} {{\frac{{{\overset{\rightarrow}{\omega}}_{i}\left( {\overset{\rightarrow}{x},s} \right)} \cdot {\overset{\rightarrow}{w}}_{i}}{{{\overset{\rightarrow}{\omega}}_{i}\left( {\sigma\left( {\overset{\rightarrow}{x},s} \right)} \right)} \cdot {\overset{\rightarrow}{w}}_{i}} = s}{\frac{{{\overset{\rightarrow}{\omega}}_{i}\left( {\overset{\rightarrow}{x},s} \right)} \cdot \left( {p \times {\overset{\rightarrow}{w}}_{i}} \right)}{{{\overset{\rightarrow}{\omega}}_{i}\left( {\sigma\left( {\overset{\rightarrow}{x},s} \right)} \right)} \cdot \left( {p \times {\overset{\rightarrow}{w}}_{i}} \right)} = {\sqrt{1/s}.}}} & (36) \end{matrix}$

The rotation part of stretching may be applied to {right arrow over (w)}_(i′) and the scale part to s_(i′), and obtain a stretched vorticle:

$\begin{matrix} {r_{i}^{\prime} = r_{i}} & (37) \\ {{\overset{\rightarrow}{w}}_{i}^{\prime} = {{{\overset{\rightarrow}{w}}_{i}}\frac{{\overset{\rightarrow}{\omega}}_{i}^{\prime}\left( p_{i} \right)}{{{\overset{\rightarrow}{\omega}}_{i}^{\prime}\left( p_{i}^{\prime} \right)}}}} & (38) \\ {s_{i}^{\prime} = \frac{{{\overset{\rightarrow}{\omega}}_{i}^{\prime}\left( p_{i}^{\prime} \right)}}{{{\overset{\rightarrow}{\omega}}_{i}\left( p_{i} \right)}}} & (39) \end{matrix}$

The stretchable vorticle may then be unstretched in a manner that preserves both E_(i) and the enstrophy Ω_(i) of the stretched vorticle. Preserving enstrophy is a local way to reduce as much as possible the disruption of this step over the vorticity dynamics.

$\begin{matrix} {\Omega_{i} = {{\frac{1}{2}{\int_{\;}^{\;}{{\overset{\rightarrow}{\omega}}_{i}^{2}{dx}}}} = {\frac{3{\pi^{2}\left( {1 + {4s_{i}^{\prime 3}}} \right)}}{64r_{i}^{\prime 3}s_{i}^{{\prime 8}/5}}{{{\overset{\rightarrow}{w}}_{i}^{\prime}}^{2}.}}}} & (40) \end{matrix}$

The stretching factor is restored to 1, and the resulting vorticle is unstretched:

$\begin{matrix} {{r_{i}^{''} = {r_{i}{s_{i}^{{\prime 4}/5}\left( \frac{5}{1 + {4s_{i}^{\prime 3}}} \right)}^{1/2}}}{{\overset{\rightarrow}{w}}_{i}^{''} = {\sqrt{\frac{r_{i}^{''}}{r_{i}}}{{\overset{\rightarrow}{w}}_{i}}\frac{{\overset{\rightarrow}{w}}_{i}^{\prime}\left( p_{i}^{\prime} \right)}{{{\overset{\rightarrow}{w}}_{i}^{\prime}\left( p_{i}^{\prime} \right)}}}}} & (41) \end{matrix}$

This can be an important new insight: when a vorticle's stretching factor is greater than 1, its strength must be reduced so that the mean vorticity and enstrophy can be preserved. Limit resolutions may also be specified with a lower threshold r_(min) and upper threshold r_(max) on the vorticle size r_(i). This limit resolution loses enstrophy, but does not lose energy because of Eq. (9). Thus Eq. (34), Eq. (39), and Eq. (41) can provide a way to apply stable energy preserving stretching to a vorticle. In a real fluid, turbulence approaching the fluid's Kolmogorov length mix with an effective viscosity. When a vorticle is squeezed below r_(min), the stretching may be turned into a higher viscosity coefficient for that vorticle, with the diffusion per vorticle of the next section. This is necessary to remove vorticles with small contribution.

FIGS. 15A-15C illustrate a first vorticle 1510 (FIG. 15A) is stretched into a second vorticle 1520 (FIG. 15B), where the mean energy is preserved while the enstrophy changes; and the second vorticle 1520 is then resampled in an unstretched third vorticle 1530 (FIG. 15C) with the same mean energy and enstrophy as the second vorticle 1520.

E. Viscosity

The term v∇²{right arrow over (ω)} in Eq. (2) models viscosity. It is the analogue of the viscosity term of Eq. (1), with the difference that ν is varying if the density ρ is varying. Since vorticles have a size and aren't singular at their center, a well behaved vorticle derivative that is consistent with the dynamics can be computed: ∇²{right arrow over (ω)}_(i)({right arrow over (x)})=15(∥{right arrow over (x)}∥ ² ξ_(i) ²−1)ξ_(i) ⁵(2{right arrow over (w)} _(i)−7ξ_(i) ² {right arrow over (x)}×{right arrow over (w)} _(i) ×{right arrow over (x)})  (42)

This equation may be solved in a multiscale manner with a near and far diffusion in an octree, as discussed above.

$\frac{d\;{\overset{\rightarrow}{\omega}}_{i}}{dt} = {v{\nabla^{2}{\overset{\rightarrow}{\omega}}_{i}}}$ may be solved more simply, by updating the vorticle enstrophy to match that of {right arrow over (ω)}_(i)+Δ_(i)ν∇^(2{right arrow over (ω)}) _(i). Since vorticles have no mass, this model disregards the mass of the advected quantity. Its advantage however is in providing users with a viscosity that is spatially tweakable per vorticle, and bound to the dynamics. The linear approximation is only valid when the diffusion Δ_(i)ν is small enough. Therefore, the diffusion may be clamped to enforce monotonicity. After one time step, the vorticle strength becomes:

$\begin{matrix} {{\overset{\rightarrow}{w}}_{i} = \left\{ \begin{matrix} {{\sqrt{1 + {\frac{\Delta_{t}v}{r_{i}^{2}}\left( {\frac{11025\mspace{14mu}\Delta_{t}v}{256\mspace{14mu} r_{i}^{2}} - \frac{35}{4}} \right)}}\mspace{14mu}{\overset{\rightarrow}{w}}_{i}\mspace{14mu}{if}\mspace{14mu}\Delta_{t}v} < {\frac{32}{315}r_{i}^{2}}} \\ {\frac{\sqrt{5}}{3}\mspace{14mu}{\overset{\rightarrow}{w}}_{i}\mspace{14mu}{otherwise}} \end{matrix} \right.} & (43) \end{matrix}$

Another limitation of this viscous model is that it does not carry the diffusion of direction from vorticle to vorticle.

F. Buoyancy

When p is outside of solid objects, the term

${{\nabla{\log(\rho)}} \times \left( {\overset{\rightarrow}{F} - \frac{d\;\overset{\rightarrow}{u}}{dt}} \right)} + {\nabla{\times \overset{\rightarrow}{F}\mspace{14mu}{in}\mspace{14mu}{{Eq}.\mspace{14mu}(2)}}}$ becomes

${{{\nabla{\log(\rho)}} \times \left( {\overset{\rightarrow}{g} + \overset{\rightarrow}{e} - \frac{d\;\overset{\rightarrow}{u}}{dt}} \right)} + {\nabla{\times \overset{\rightarrow}{e}}}},$ and models the vorticity induced by buoyancy. This component may require a varying density in order to have any effect.

New vorticles are produced from the density field ρ releasing potential energy. ρ may be defined with a set of particles carrying density and an ambient density ρ_(A)>0, so the total density field ρ is strictly greater than 0, as required by Eq. (2): ρ=ρ_(A)+Σρ_(j).  (44)

FIG. 16 illustrates a density particle emits a ring of vorticles (red). The ring may be sampled with vorticles of strengths that match the mass of the density particles, as visualized on points (green lattice).

The falloff ρ_(i) of a density particle j is centered at x_(j), and defined per Appendix 7 in local coordinates q_(j)=p−x_(j) as:

$\begin{matrix} {{\rho_{j} = {m_{j}\frac{{\exp\left( \left( {1 + {\kappa_{1}\frac{q_{j}q_{j}}{2r_{j}^{2}}}} \right)^{- \kappa_{2}} \right)} - 1}{e - 1}}},} & (45) \end{matrix}$ where m_(j) is a multiplier of the particle density field, and κ_(i) is is given in Eq. (55). The newly induced vorticles are located along a ring of diameter r_(j) perpendicular to

$\overset{\rightarrow}{g} + \overset{\rightarrow}{e} - {\frac{d\overset{\rightarrow}{u}}{dt}.}$ Instead of advecting an additional filament representation, the ring with n new vorticles may be discretized, equidistant for simplicity, and where n=2 in practice. Orthogonal unit vectors {right arrow over (a)} and {right arrow over (b)} may be defined such that {right arrow over (a)}×{right arrow over (b)} has the direction of

$\overset{\rightarrow}{g} + \overset{\rightarrow}{e} - {\frac{d\overset{\rightarrow}{u}}{dt}.}$ Given n randomly selected samples α_(j), the new vorticles are in the density particle's local coordinates:

$\begin{matrix} {\mspace{79mu}{{x_{\alpha\; j} = {x_{j} + {\frac{r_{j}}{2}\left( {{{\cos\left( \;\alpha_{j} \right)}\overset{\rightarrow}{a}} + {{\sin\left( \alpha_{j} \right)}\overset{\rightarrow}{b}}} \right)}}}{{\overset{\rightarrow}{w}}_{\alpha\; j} = {r_{j}\sqrt{r_{j}}\kappa_{0}\frac{\pi}{n}{{\overset{\rightarrow}{g} + \overset{\rightarrow}{e} - \frac{d\overset{\rightarrow}{u}}{dt}}}\frac{{\rho_{j}\left( x_{\alpha} \right)} + \frac{m_{j}}{e - 1}}{\rho\left( x_{\alpha} \right)}\left( {{{- {\sin\left( \alpha_{j} \right)}}\overset{\rightarrow}{a}} + {{\cos\left( \alpha_{j} \right)}\overset{\rightarrow}{b}}} \right)}}\mspace{20mu}{r_{\alpha_{j}} = r_{j}}}} & (46) \end{matrix}$

To evaluate the acceleration

$\frac{d\overset{\rightarrow}{u}}{dt},$ the velocity may be sampled both after and before the advection of the particle, before emission of new vorticles in order to avoid the temporal jolt of the new vorticles.

G. Vorticity Shedding

When p is at the boundary of a solid object, the term

${\bigtriangledown\;{\log(\rho)} \times \left( {\overset{\rightarrow}{F} - \frac{d\;\overset{\rightarrow}{u}}{dt}} \right)} + {\bigtriangledown \times \overset{\rightarrow}{F}}$ in Eq. (2) measures the change of vorticity at the moving object's boundary. This component is absent in inviscid fluids, and always present in real fluids. The viscosity coefficient for vorticity shedding can be specified independently from the viscosity discussed above.

The surface vorticity spreads into the flow by a diffusion proportional to viscosity coefficient ν. We show in Appendix 8 that the surface vorticity that satisfies our boundary conditions is

$\left( {\overset{\rightarrow}{f} - \overset{\rightarrow}{e} - \frac{d\overset{\rightarrow}{u}}{dt}} \right) \times {\overset{\rightarrow}{n}.}$ The vorticity shedding may be the solution to a differential equation with boundary condition:

$\begin{matrix} \left\{ \begin{matrix} {\frac{d\overset{\rightarrow}{\omega}}{dt} = {v\;\bigtriangledown^{2}\overset{\rightarrow}{\omega}}} \\ {\overset{\rightarrow}{\omega}\underset{p \in {\delta\Omega}}{=}{{\Delta_{t}\left( {\overset{\rightarrow}{f} - \overset{\rightarrow}{e} - \frac{d\overset{\rightarrow}{u}}{dt}} \right)} \times \overset{\rightarrow}{n}}} \end{matrix} \right. & (47) \end{matrix}$

Eq. (47) may be solved by shedding vorticles. The surface may be divided into n panels of area a_(i) and centroid x_(i), and emit per panel a vorticle that roughly approximates the heat kernel during a time step Δ_(i):

$\begin{matrix} {{{\overset{\rightarrow}{w}}_{i} = {a_{i}\frac{r^{1/2}}{4\;\pi}\left( {\overset{\rightarrow}{f} - \overset{\rightarrow}{e} - \frac{d\overset{\rightarrow}{u}}{dt}} \right) \times \overset{\rightarrow}{n}}}{r_{i} = {\sqrt{2}{\sqrt{\Delta_{t}v}.}}}} & (48) \end{matrix}$

${\left( {\overset{\rightarrow}{f} - \overset{\rightarrow}{e} - \frac{d\overset{\rightarrow}{u}}{dt}} \right) \times \overset{\rightarrow}{n}}$ normalized over the surface may be used, as a probability distribution function to create samples at the locations that most affect the flow. Note that {right arrow over (f)} is the surface acceleration, as opposed to the velocity. To compute the acceleration, Eq. (6) at the previous time may be stored on the surface, and

$\frac{d\overset{\rightarrow}{u}}{dt} \simeq \frac{{\overset{\rightarrow}{u}(t)} - {\overset{\rightarrow}{u}\left( {t - \Delta_{t}} \right)}}{\Delta_{t}}$ may be used.

This may produce the expected behavior as illustrated in FIGS. 17A-17B. FIG. 17A illustrates a constant flow moves at 10 ms⁻¹ with ν=0.1 around a static pole of radius 1 (red): the surface sheds vorticles (black arrows). FIG. 17B illustrates a slice of the vorticity induced by the vorticles that reveals the emergent behavior of a von Kármán vortex street. Furthermore, users can modify separately shedding induced by surface acceleration {right arrow over (f)} and fluid acceleration

$\frac{d\overset{\rightarrow}{u}}{dt}.$

Optimization

User emitters, buoyancy, and shedding introduce an increasing number of vorticles in the simulation. To address this rise of complexity, a fusing step may be used. Using the existing octree data structure, similar vorticles in each octree cell may be merged. The extreme fusion case is one vorticle per cell. The fusing method may favor the vorticle of high energy, and equals the combined energy when {right arrow over (w)}₀={right arrow over (w)}₁ and r₀=r₁:

$p = \frac{{\sqrt{E_{0}}p_{0}} + {\sqrt{E_{1}}p_{1}}}{\sqrt{E_{0}} + \sqrt{E_{1}}}$ $r = \frac{{\sqrt{E_{0}}r_{0}} + {\sqrt{E_{1}}r_{1}}}{\sqrt{E_{0}} + \sqrt{E_{1}}}$ $\overset{\rightarrow}{w} = {{\left( {r_{0}/r} \right)^{3/2}{\overset{\rightarrow}{w}}_{0}} + {\left( {r_{1}/r} \right)^{3/2}{\overset{\rightarrow}{w}}_{1}}}$

H. Multi-Scale Density Advection

Modern renderers handle volumes in the form of voxel grids. It may therefore be necessary to output the density and velocity in that form. A simple method may be used as a starting point for a full solution, compatible with available volume data structures [Museth 2013; Wrenninge 2016]. According to some embodiments, given a single smoke density emitter, the space may be split into multiple grids: density is emitted in a grid with a resolution based on the position in camera space of the emitter at the times of emission. The velocity is then evaluated in the grid, and used for advecting the density (i.e., “moving” the density). Since all densities share a common velocity field, the dynamics may remain consistent, and multiple density resolutions may overlap in an additive manner.

FIGS. 18A-18E illustrate schematically a method of forming a density grid according to some embodiments. Referring to FIG. 18A, a camera is located at the point p. The three-dimensional space surrounding the camera may be split into a set of regions defined by concentric spheres centered at p. In some embodiments, the radii of the spheres may increase exponentially as r_(j)=2^(j)×r, where r is the radius of the inner-most sphere. A region S_(j) may be defined as the space located between two consecutive spheres, i.e., a sphere of radius 2^(j)×r and the next larger sphere of radius 2^(j+1)×r. For instance, in the example illustrated in FIG. 18A, the set of regions may include a first region S₀ defined by the inner-most sphere 1810 of radius r, a second region S₁ located between the inner-most sphere 1810 and the next larger sphere 1820 of radius 2r, and a third region S₂ located between the sphere 1820 and the next larger sphere 1830 of radius 4r, and so on and so forth.

In some embodiments, each region S_(j) may be associated with two voxel grids: a density voxel grid and a velocity voxel grid. The size of the density voxel grid for each region S_(j) may increase exponentially as 2^(j)×SizeA. For instance, in the examples illustrated in FIGS. 18B-18D, the first region S₀ may be associated with a 4×4 density voxel grid with a grid size of SizeA (FIG. 18B), the second region S₁ may be associated with a 4×4 density voxel grid with a grid size of 2×SizeA (FIG. 18C), and the third region S₂ may be associated with a 4×4 density voxel grid with a grid size of 4×SizeA (FIG. 18D). FIG. 18E illustrates how the density voxel grids of the various regions S₀, S₁, and S₂ may be tiled to form an overall sparse density voxel grid.

Similarly, the size of the velocity voxel grid for each region S_(j) may increase exponentially as 2^(j)×SizeB. In some embodiments, SizeB may be chosen to be greater than SizeA, so that each density voxel is covered by a velocity voxel. For example, SizeB may be chosen to be twice of SizeA as SizeB=2×SizeA. Thus, in the example illustrated in FIGS. 18A-18E, the velocity voxel grid for each region may be a 2×2 grid. The velocity voxel grids of the various regions S₀, S₁, and S₂ may be tiled with each other to form an overall sparse velocity voxel grid.

In some embodiments, as a density emitter overlaps a region, any inactive density voxels in the region that overlap with the emitter may be activated, and densities are added to those density voxels. For instance, in the example illustrated in FIG. 18E, the density emitter 1840 overlaps with a first density voxel 1850 and a second density voxel 1860 in the second region S₁, and a third density voxel 1870 in the third region S₂. If the first density voxel 1850, the second density voxel 1860, and the third density voxel 1870 are inactive (i.e., have not been activated in a previous frame), they will be activated and densities are added to each one of those density voxels according to the density emitter 1840.

Because the resolution of the density voxel grids may vary from one region to another, two neighboring density voxel grids can have overlapping density voxels. In some embodiments, to find the density at a point in a region with overlapping density voxels, the densities of the overlapping density voxels may be summed by the renderer.

In some embodiments, as a density voxel is activated, a corresponding velocity voxel that covers the density voxel may be activated. Therefore, there is always active velocity voxels covering active density voxels. Each activated velocity voxel is then initialized by computing the velocity induced by the vorticles, using the acceleration octree structure, as discussed above. The velocity voxel grid is then used to advect the density voxel grid to the next frame, using a semi-Lagrangian advection. The term “advect” may refer to “moving” (e.g., the density).

In some embodiments, one or more density voxels may be pre-activated for a next frame using the velocity voxel grid. For example, a density voxel may be deformed using the velocity voxel grid to predict a deformed shape of the density emitter for the next frame. Those inactive density voxels that overlap with the deformed density emitter may be pre-activated.

In some other embodiments, the velocity voxel grid may be optional. Some renders may be capable of rendering sub-frame density, that is, sub-frame density voxel grids that can capture the variation over the course of a single frame.

I. Methods of Computer Graphic Simulation of Smoke

According to some embodiments, methods of simulating smoke in a computer graphic system may include the following steps:

(a) Add emitted vorticles, e.g., by splitting the emitter's energy among vorticles using Eq. (10).

(b) Build the octree of vorticles: store each vorticle in the cell of size

$2^{\lceil\frac{{logr}_{i}}{\log\; 2}\rceil},$ and allocate the far interacting cells, as described above. (c) Compute the advected field near coefficients, as described above. (d) Evaluate the advected field {right arrow over (v)} at every panel location, using Eq. (12), as described above. (e) Compute the source and doublet panel coefficients σ_(i) and μ_(i) by solving Eq. (27), as described above. (f) Build the octree of panels: store each panel in the cell of size

$2^{\lceil\frac{{logr}_{i}}{\log\; 2}\rceil},$ and allocate the far interacting cells, as described above. (g) Compute the harmonic field near coefficients, as described above. (h) Insert new density in the density voxels. (i) Allocate velocity voxels and compute velocity field {right arrow over (u)} at every voxel. (j) Advect the density using the velocity voxels. (k) Compute the velocity field a at every vorticle. Note that this step does not use the velocity voxels, but instead the octree structure. (l) Advect the vorticles, as described above. (m) Stretch vorticles, as described above. (n) Diffuse vorticles, as described above.

FIG. 19 is a flowchart illustrating a method of computer graphic image processing for generating rendered image frames of incompressible gas corresponding to a camera view of a three-dimensional virtual space according to some embodiments.

At 1902, a plurality of vorticles is generated. Each respective vorticle is centered at a respective position in the virtual space and has a respective spatial size.

At 1904, advected field of the plurality of vorticles is computed by solving a vorticity equation using a fast multipole method (FMM).

At 1906, the virtual space is divided into a plurality of concentric regions surrounding a position of a camera. In some embodiments, the plurality of concentric regions may be defined by a plurality of concentric spheres, and each respective region is located between two consecutive spheres, as discussed above in relation to FIG. 18A. In some other embodiments, the plurality of concentric regions may be defined by a plurality of concentric cubes, rectangular shapes, or the like.

At 1908, a respective density voxel grid is defined for each respective region of the plurality of concentric regions. Each respective density voxel grid may have a respective first voxel size that increases with increasing distance from the position of the camera. In some embodiments, the first voxel size may increase with increasing distance from the position of the camera as an exponential function, as discussed above in relation to FIGS. 18B-18E. In other embodiments, the first voxel size may be constant in various regions.

At 1910, a respective velocity voxel grid is defined for each respective region of the plurality of concentric regions. Each respective velocity voxel grid may have a respective second voxel size that increases with increasing distance from the position of the camera, as discussed above. In some embodiments, the respective second voxel size of each respective velocity voxel grid is greater than the respective first voxel size of the corresponding density voxel grid, as discussed above.

At 1912, a new density representing a smoke emitter is added. the new density has a first distribution in a first region of the virtual space. The first region may overlap with one or more regions of the plurality of concentric regions.

At 1914, each density voxel of the one or more regions that overlaps with the first region is activated, and adding density is added thereto.

At 1916, each velocity voxel of the one or more regions that overlaps with the active density voxels is activated, and velocity field at the velocity voxel is computed.

At 1918, the new density is moved based on the velocity field of each active velocity voxel to obtain a second distribution of the new density in a second region of the virtual space for a next frame.

At 1920, each density voxel that overlaps with the second region is activated, and density is added thereto.

At 1922, the density of each active density voxel and the velocity field of each active velocity voxel is stored in a computer-readable medium as the next frame for display at a screen.

In some embodiments, computing the advected field of the plurality of vorticles using the FMM may include building an octree of vorticles. The octree may include a plurality octree levels. Each respective octree level may have a cell size that is proportional to 2^(−L), where L is a level number of the respective octree level. Each respective vorticle of the plurality of vorticles may be stored in a respective cell of a respective octree level having a cell size that is proportional to the spatial size of the respective vorticle. For example, each vorticle may be stored in a cell having a cell size of

$2^{\lceil\frac{{logr}_{i}}{\log\; 2}\rceil},$ where r_(i) is the spatial size of the respective vorticle. A first cell containing the position of the camera and cells that are direct neighbors of the first cell may be referred to as near cells, and all other cells may be referred to as far cells. The advected field may be computed using the FMM by summing the vorticles stored in each respective far cell.

In some embodiments, velocity field of the plurality of vorticles may be computed, and the plurality of vorticles may be moved to a next frame based on the velocity field using the octree.

J. Examples

FIGS. 20A-20B illustrate a smoke column simulated according to some embodiments. FIG. 20A shows the vorticles, and FIG. 20B shows density advected using the vorticles. As illustrated, turbulence size can be explicit. For example, the turbulence may become naturally smaller as the fluid evolves. This can also be controlled artificially. Also, the size of the turbulence can vary from large to small. In fact, the simulation methods disclosed herein can be multiscale and can combine tiny vorticles with very large vorticles in a stable manner. This can be advantageous for sampling fluids in a camera frustum.

FIGS. 21A-21D illustrate an example of a simulator that may take advantage of a camera frustum according to some embodiments. As the smoke emitter moves away from the camera (as shown in FIG. 21A), there are fewer vorticles (as shown in FIG. 21B), and the number of density voxels in the distance may be reduced (as shown in FIG. 21C). FIG. 21D shows a top down view of FIG. 21C, where one may more clearly see that voxels near the camera are smaller than voxels far from the camera.

FIG. 22A illustrates how tiny vorticles (shown in white) may interact with large vorticles (shown in black) according to some embodiments. FIG. 22B shows the density advected using the vorticles illustrated in FIG. 22A.

FIGS. 23A-23B illustrate how the harmonic field may play the same role as the pressure term in the classic grid-based Navier-Stokes equation according to some embodiments. The harmonic field may ensure that the flow does not cross boundaries of an object. The harmonic field may be computed using the source and doublet panel method as discussed above.

As described above, embodiments of the present invention provide methods of solving the Navier-Stokes' differential equation using spherical harmonics across multiple resolutions. There is no constraint on placing vorticles of arbitrary size. The methods can be very stable with mixed scales. The divergence-free basis functions may produce a field with no divergence by construction. The sampling resolution of density, dynamics and boundary condition may be decoupled from each other, and each can be sampled adaptively. The panel method may be further improved by filtering the advected field with a filter size proportional to the panel size. Vorticles that carry a volume of vorticity can be advected, as opposed to regularizing a point vorticity. This may lead to stable and energy preserving stretching. The stretching model may be further improved by splitting stretched vorticles along the stretching directions, which would be closer to the physical phenomenon that spreads turbulence along stretched features. It may also be advantageous to vary the multipole expansion across scale for better control of the error. Additional stability may be achieved by integrating twists instead of velocity. Also, the model for buoyancy, which may play a key role in gas motion, is proposed for producing more lively smokes and pyroclastic effects. The methods may provide the full set of features expected from a gas simulation, and can be an important tool for making visual effects in computer graphic simulation.

K. Computer Systems

FIG. 24 is a simplified block diagram of system 2400 for creating computer graphics imagery (CGI) and computer-aided animation that may implement or incorporate various embodiments. In this example, system 2400 can include one or more design computers 2410, object library 2420, one or more object modeler systems 2430, one or more object articulation systems 2440, one or more object animation systems 2450, one or more object simulation systems 2460, and one or more object rendering systems 2470. Any of the systems 2430-870 may be invoked by or used directly by a user of the one or more design computers 2410 and/or automatically invoked by or used by one or more processes associated with the one or more design computers 2410. Any of the elements of system 2400 can include hardware and/or software elements configured for specific functions.

The one or more design computers 2410 can include hardware and software elements configured for designing CGI and assisting with computer-aided animation. Each of the one or more design computers 2410 may be embodied as a single computing device or a set of one or more computing devices. Some examples of computing devices are PCs, laptops, workstations, mainframes, cluster computing system, grid computing systems, cloud computing systems, embedded devices, computer graphics devices, gaming devices and consoles, consumer electronic devices having programmable processors, or the like. The one or more design computers 2410 may be used at various stages of a production process (e.g., pre-production, designing, creating, editing, simulating, animating, rendering, post-production, etc.) to produce images, image sequences, motion pictures, video, audio, or associated effects related to CGI and animation.

In one example, a user of the one or more design computers 2410 acting as a modeler may employ one or more systems or tools to design, create, or modify objects within a computer-generated scene. The modeler may use modeling software to sculpt and refine a neutral 3D model to fit predefined aesthetic needs of one or more character designers. The modeler may design and maintain a modeling topology conducive to a storyboarded range of deformations. In another example, a user of the one or more design computers 2410 acting as an articulator may employ one or more systems or tools to design, create, or modify controls or animation variables (avars) of models. In general, rigging is a process of giving an object, such as a character model, controls for movement, therein “articulating” its ranges of motion. The articulator may work closely with one or more animators in rig building to provide and refine an articulation of the full range of expressions and body movement needed to support a character's acting range in an animation. In a further example, a user of design computer 2410 acting as an animator may employ one or more systems or tools to specify motion and position of one or more objects over time to produce an animation.

Object library 2420 can include elements configured for storing and accessing information related to objects used by the one or more design computers 2410 during the various stages of a production process to produce CGI and animation. Some examples of object library 2420 can include a file, a database, or other storage devices and mechanisms. Object library 2420 may be locally accessible to the one or more design computers 2410 or hosted by one or more external computer systems.

Some examples of information stored in object library 2420 can include an object itself, metadata, object geometry, object topology, rigging, control data, animation data, animation cues, simulation data, texture data, lighting data, shader code, or the like. An object stored in object library 2420 can include any entity that has an n-dimensional (e.g., 2D or 3D) surface geometry. The shape of the object can include a set of points or locations in space (e.g., object space) that make up the object's surface. Topology of an object can include the connectivity of the surface of the object (e.g., the genus or number of holes in an object) or the vertex/edge/face connectivity of an object.

The one or more object modeling systems 2430 can include hardware and/or software elements configured for modeling one or more objects. Modeling can include the creating, sculpting, and editing of an object. In various embodiments, the one or more object modeling systems 2430 may be configured to generated a model to include a description of the shape of an object. The one or more object modeling systems 2430 can be configured to facilitate the creation and/or editing of features, such as non-uniform rational B-splines or NURBS, polygons and subdivision surfaces (or SubDivs), that may be used to describe the shape of an object. In general, polygons are a widely used model medium due to their relative stability and functionality. Polygons can also act as the bridge between NURBS and SubDivs. NURBS are used mainly for their ready-smooth appearance and generally respond well to deformations. SubDivs are a combination of both NURBS and polygons representing a smooth surface via the specification of a coarser piecewise linear polygon mesh. A single object may have several different models that describe its shape.

The one or more object modeling systems 2430 may further generate model data (e.g., 2D and 3D model data) for use by other elements of system 2400 or that can be stored in object library 2420. The one or more object modeling systems 2430 may be configured to allow a user to associate additional information, metadata, color, lighting, rigging, controls, or the like, with all or a portion of the generated model data.

The one or more object articulation systems 2440 can include hardware and/or software elements configured to articulating one or more computer-generated objects. Articulation can include the building or creation of rigs, the rigging of an object, and the editing of rigging. In various embodiments, the one or more articulation systems 2440 can be configured to enable the specification of rigging for an object, such as for internal skeletal structures or eternal features, and to define how input motion deforms the object. One technique is called “skeletal animation,” in which a character can be represented in at least two parts: a surface representation used to draw the character (called the skin) and a hierarchical set of bones used for animation (called the skeleton).

The one or more object articulation systems 2440 may further generate articulation data (e.g., data associated with controls or animations variables) for use by other elements of system 2400 or that can be stored in object library 2420. The one or more object articulation systems 2440 may be configured to allow a user to associate additional information, metadata, color, lighting, rigging, controls, or the like, with all or a portion of the generated articulation data.

The one or more object animation systems 2450 can include hardware and/or software elements configured for animating one or more computer-generated objects. Animation can include the specification of motion and position of an object over time. The one or more object animation systems 2450 may be invoked by or used directly by a user of the one or more design computers 2410 and/or automatically invoked by or used by one or more processes associated with the one or more design computers 2410.

In various embodiments, the one or more animation systems 2450 may be configured to enable users to manipulate controls or animation variables or utilized character rigging to specify one or more key frames of animation sequence. The one or more animation systems 2450 generate intermediary frames based on the one or more key frames. In some embodiments, the one or more animation systems 2450 may be configured to enable users to specify animation cues, paths, or the like according to one or more predefined sequences. The one or more animation systems 2450 generate frames of the animation based on the animation cues or paths. In further embodiments, the one or more animation systems 2450 may be configured to enable users to define animations using one or more animation languages, morphs, deformations, or the like.

The one or more object animations systems 2450 may further generate animation data (e.g., inputs associated with controls or animations variables) for use by other elements of system 2400 or that can be stored in object library 2420. The one or more object animations systems 2450 may be configured to allow a user to associate additional information, metadata, color, lighting, rigging, controls, or the like, with all or a portion of the generated animation data.

The one or more object simulation systems 2460 can include hardware and/or software elements configured for simulating one or more computer-generated objects. Simulation can include determining motion and position of an object over time in response to one or more simulated forces or conditions. The one or more object simulation systems 2460 may be invoked by or used directly by a user of the one or more design computers 2410 and/or automatically invoked by or used by one or more processes associated with the one or more design computers 2410.

In various embodiments, the one or more object simulation systems 2460 may be configured to enables users to create, define, or edit simulation engines, such as a physics engine or physics processing unit (PPU/GPGPU) using one or more physically-based numerical techniques. In general, a physics engine can include a computer program that simulates one or more physics models (e.g., a Newtonian physics model), using variables such as mass, velocity, friction, wind resistance, or the like. The physics engine may simulate and predict effects under different conditions that would approximate what happens to an object according to the physics model. The one or more object simulation systems 2460 may be used to simulate the behavior of objects, such as hair, fur, and cloth, in response to a physics model and/or animation of one or more characters and objects within a computer-generated scene.

The one or more object simulation systems 2460 may further generate simulation data (e.g., motion and position of an object over time) for use by other elements of system 2400 or that can be stored in object library 2420. The generated simulation data may be combined with or used in addition to animation data generated by the one or more object animation systems 2450. The one or more object simulation systems 2460 may be configured to allow a user to associate additional information, metadata, color, lighting, rigging, controls, or the like, with all or a portion of the generated simulation data.

The one or more object rendering systems 2470 can include hardware and/or software element configured for “rendering” or generating one or more images of one or more computer-generated objects. “Rendering” can include generating an image from a model based on information such as geometry, viewpoint, texture, lighting, and shading information. The one or more object rendering systems 2470 may be invoked by or used directly by a user of the one or more design computers 2410 and/or automatically invoked by or used by one or more processes associated with the one or more design computers 2410. One example of a software program embodied as the one or more object rendering systems 2470 can include PhotoRealistic RenderMan, or PRMan, produced by Pixar Animations Studios of Emeryville, Calif.

In various embodiments, the one or more object rendering systems 2470 can be configured to render one or more objects to produce one or more computer-generated images or a set of images over time that provide an animation. The one or more object rendering systems 2470 may generate digital images or raster graphics images.

In various embodiments, a rendered image can be understood in terms of a number of visible features. Some examples of visible features that may be considered by the one or more object rendering systems 2470 may include shading (e.g., techniques relating to how the color and brightness of a surface varies with lighting), texture-mapping (e.g., techniques relating to applying detail information to surfaces or objects using maps), bump-mapping (e.g., techniques relating to simulating small-scale bumpiness on surfaces), fogging/participating medium (e.g., techniques relating to how light dims when passing through non-clear atmosphere or air) shadows (e.g., techniques relating to effects of obstructing light), soft shadows (e.g., techniques relating to varying darkness caused by partially obscured light sources), reflection (e.g., techniques relating to mirror-like or highly glossy reflection), transparency or opacity (e.g., techniques relating to sharp transmissions of light through solid objects), translucency (e.g., techniques relating to highly scattered transmissions of light through solid objects), refraction (e.g., techniques relating to bending of light associated with transparency), diffraction (e.g., techniques relating to bending, spreading and interference of light passing by an object or aperture that disrupts the ray), indirect illumination (e.g., techniques relating to surfaces illuminated by light reflected off other surfaces, rather than directly from a light source, also known as global illumination), caustics (e.g., a form of indirect illumination with techniques relating to reflections of light off a shiny object, or focusing of light through a transparent object, to produce bright highlights on another object), depth of field (e.g., techniques relating to how objects appear blurry or out of focus when too far in front of or behind the object in focus), motion blur (e.g., techniques relating to how objects appear blurry due to high-speed motion, or the motion of the camera), non-photorealistic rendering (e.g., techniques relating to rendering of scenes in an artistic style, intended to look like a painting or drawing), or the like.

The one or more object rendering systems 2470 may further render images (e.g., motion and position of an object over time) for use by other elements of system 2400 or that can be stored in object library 2420. The one or more object rendering systems 2470 may be configured to allow a user to associate additional information or metadata with all or a portion of the rendered image.

FIG. 25 is a block diagram of computer system 2500. FIG. 25 is merely illustrative. In some embodiments, a computer system includes a single computer apparatus, where the subsystems can be the components of the computer apparatus. In other embodiments, a computer system can include multiple computer apparatuses, each being a subsystem, with internal components. Computer system 2500 and any of its components or subsystems can include hardware and/or software elements configured for performing methods described herein.

Computer system 2500 may include familiar computer components, such as one or more one or more data processors or central processing units (CPUs) 2505, one or more graphics processors or graphical processing units (GPUs) 2510, memory subsystem 2515, storage subsystem 2520, one or more input/output (I/O) interfaces 2525, communications interface 2530, or the like. Computer system 2500 can include system bus 2535 interconnecting the above components and providing functionality, such connectivity and inter-device communication

The one or more data processors or central processing units (CPUs) 2505 can execute logic or program code or for providing application-specific functionality. Some examples of CPU(s) 2505 can include one or more microprocessors (e.g., single core and multi-core) or micro-controllers, one or more field-gate programmable arrays (FPGAs), and application-specific integrated circuits (ASICs). As user herein, a processor includes a multi-core processor on a same integrated chip, or multiple processing units on a single circuit board or networked.

The one or more graphics processor or graphical processing units (GPUs) 2510 can execute logic or program code associated with graphics or for providing graphics-specific functionality. GPUs 2510 may include any conventional graphics processing unit, such as those provided by conventional video cards. In various embodiments, GPUs 2510 may include one or more vector or parallel processing units. These GPUs may be user programmable, and include hardware elements for encoding/decoding specific types of data (e.g., video data) or for accelerating 2D or 3D drawing operations, texturing operations, shading operations, or the like. The one or more graphics processors or graphical processing units (GPUs) 2510 may include any number of registers, logic units, arithmetic units, caches, memory interfaces, or the like.

Memory subsystem 2515 can store information, e.g., using machine-readable articles, information storage devices, or computer-readable storage media. Some examples can include random access memories (RAM), read-only-memories (ROMS), volatile memories, non-volatile memories, and other semiconductor memories. Memory subsystem 2515 can include data and program code 2540.

Storage subsystem 2520 can also store information using machine-readable articles, information storage devices, or computer-readable storage media. Storage subsystem 2520 may store information using storage media 2545. Some examples of storage media 2545 used by storage subsystem 2520 can include floppy disks, hard disks, optical storage media such as CD-ROMS, DVDs and bar codes, removable storage devices, networked storage devices, or the like. In some embodiments, all or part of data and program code 2540 may be stored using storage subsystem 2520.

The one or more input/output (I/O) interfaces 2525 can perform I/O operations. One or more input devices 2550 and/or one or more output devices 2555 may be communicatively coupled to the one or more I/O interfaces 2525. The one or more input devices 2550 can receive information from one or more sources for computer system 2500. Some examples of the one or more input devices 2550 may include a computer mouse, a trackball, a track pad, a joystick, a wireless remote, a drawing tablet, a voice command system, an eye tracking system, external storage systems, a monitor appropriately configured as a touch screen, a communications interface appropriately configured as a transceiver, or the like. In various embodiments, the one or more input devices 2550 may allow a user of computer system 2500 to interact with one or more non-graphical or graphical user interfaces to enter a comment, select objects, icons, text, user interface widgets, or other user interface elements that appear on a monitor/display device via a command, a click of a button, or the like.

The one or more output devices 2555 can output information to one or more destinations for computer system 2500. Some examples of the one or more output devices 2555 can include a printer, a fax, a feedback device for a mouse or joystick, external storage systems, a monitor or other display device, a communications interface appropriately configured as a transceiver, or the like. The one or more output devices 2555 may allow a user of computer system 2500 to view objects, icons, text, user interface widgets, or other user interface elements. A display device or monitor may be used with computer system 2500 and can include hardware and/or software elements configured for displaying information.

Communications interface 2530 can perform communications operations, including sending and receiving data. Some examples of communications interface 2530 may include a network communications interface (e.g. Ethernet, Wi-Fi, etc.). For example, communications interface 2530 may be coupled to communications network/external bus 2560, such as a computer network, a USB hub, or the like. A computer system can include a plurality of the same components or subsystems, e.g., connected together by communications interface 2530 or by an internal interface. In some embodiments, computer systems, subsystem, or apparatuses can communicate over a network. In such instances, one computer can be considered a client and another computer a server, where each can be part of a same computer system. A client and a server can each include multiple systems, subsystems, or components.

Computer system 2500 may also include one or more applications (e.g., software components or functions) to be executed by a processor to execute, perform, or otherwise implement techniques disclosed herein. These applications may be embodied as data and program code 2540. Additionally, computer programs, executable computer code, human-readable source code, shader code, rendering engines, or the like, and data, such as image files, models including geometrical descriptions of objects, ordered geometric descriptions of objects, procedural descriptions of models, scene descriptor files, or the like, may be stored in memory subsystem 2515 and/or storage subsystem 2520.

Such programs may also be encoded and transmitted using carrier signals adapted for transmission via wired, optical, and/or wireless networks conforming to a variety of protocols, including the Internet. As such, a computer readable medium according to an embodiment of the present invention may be created using a data signal encoded with such programs. Computer readable media encoded with the program code may be packaged with a compatible device or provided separately from other devices (e.g., via Internet download). Any such computer readable medium may reside on or within a single computer product (e.g. a hard drive, a CD, or an entire computer system), and may be present on or within different computer products within a system or network. A computer system may include a monitor, printer, or other suitable display for providing any of the results mentioned herein to a user.

Any of the methods described herein may be totally or partially performed with a computer system including one or more processors, which can be configured to perform the steps. Thus, embodiments can be directed to computer systems configured to perform the steps of any of the methods described herein, potentially with different components performing a respective steps or a respective group of steps. Although presented as numbered steps, steps of methods herein can be performed at a same time or in a different order. Additionally, portions of these steps may be used with portions of other steps from other methods. Also, all or portions of a step may be optional. Additionally, any of the steps of any of the methods can be performed with modules, circuits, or other means for performing these steps.

The specific details of particular embodiments may be combined in any suitable manner without departing from the spirit and scope of embodiments of the invention. However, other embodiments of the invention may be directed to specific embodiments relating to each individual aspect, or specific combinations of these individual aspects.

The above description of exemplary embodiments of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form described, and many modifications and variations are possible in light of the teaching above. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications to thereby enable others skilled in the art to best utilize the invention in various embodiments and with various modifications as are suited to the particular use contemplated.

A recitation of “a”, “an” or “the” is intended to mean “one or more” unless specifically indicated to the contrary.

All patents, patent applications, publications, and descriptions mentioned here are incorporated by reference in their entirety for all purposes. None is admitted to be prior art.

L. References

Alexis Angelidis, Marie-Paule Cani, Geoff Wyvill, and Scott King. 2006a. Swirlingsweepers: constant volume modeling. Graphical Models (GMOD) 68, 4 (July 2006). Special issue on PG'04.

Alexis Angelidis, Fabrice Neyret, Karan Singh, and Derek Nowrouzezahrai. 2006b. A Controllable, Fast and Stable Basis for Vortex Based Smoke Simulation. In Proceedings of the 2006 ACM SIGGRAPH/Eurographics Symposium on Computer Animation. Eurographics Association, 25-32.

Rutherford Aris. 2012. Vectors, Tensors and the Basic Equations of Fluid Mechanics. Dover Publications.

J. Thomas Beale and Andrew Majda. 1982. Vortex methods I: Convergence in three dimensions. Math. Comp. 39 (July 1982), 1-27.

Tyson Brochu, Todd Keeler, and Robert Bridson. 2012. Linear-time Smoke Animation with Vortex Sheet Meshes. In Proceedings of the ACM SIGGRAPH/Eurographics Symposium on Computer Animation. Eurographics Association, 87-95.

Michael J. Carley. 2012. Analytical Formulae for Potential Integrals on Triangles. Journal of Applied Mechanics 80, 4 (October 2012).

Albert Chern, Felix Knoppel, Ulrich Pinkall, Peter Schroder, and Steffen Weißmann. 2016. Schrödinger's Smoke. ACM Trans. Graph. 35, 4, Article 77 (July 2016), 13 pages.

Georges-Henri. Cottet and Petros D. Koumoutsakos. 2000. Vortex Methods: Theory and Practice. Cambridge University Press.

Benoit Couet, Oscar Buneman, and Anthony Leonard. 1981. Simulation of three-dimensional incompressible flows with a vortex-in-cell method. J. Comput. Phys. 39 (February 1981), 305-328.

Tyler de Witt, Christian Lessig, and Eugene Fiume. 2012. Fluid Simulation Using Laplacian Eigenfunctions. ACM Trans. Graph. 31, 1, Article 10 (February 2012), 11 pages.

Sharif Elcott, Yiying Tong, Eva Kanso, Peter Schröder, and Mathieu Desbrun. 2007. Stable, Circulation-preserving, Simplicial Fluids. ACM Trans. Graph. 26, 1, Article 4 (January 2007), 12 pages.

Larry L. Erickson. 1990. Panel methods: An introduction. Technical Report. NASA Ames Research Center.

Nick Foster and Dimitris Metaxas. 1997. Modeling the Motion of a Hot, Turbulent Gas. In Proceedings of the 24th Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH '97). ACM Press/Addison-Wesley Publishing Co., 181-188.

Uriel Frisch and A. N. Kolmogorov. 1995. Turbulence: The Legacy of Andrei N. Kolmogorov. Cambridge University Press.

Robert A. Gingold and Joe J. Monaghan. 1977. Smoothed particle hydrodynamics—Theory and application to non-spherical stars. Monthly Notices of the Royal Astronomical Society 181 (November 1977), 375-389.

Leslie Greengard and Vladimir Rokhlin. 1987. A Fast Algorithm for Particle Simulations. J. Comput. Phys. 73, 2 (December 1987), 325-348.

Doyub Kim, Seung Woo Lee, Oh-Young Song, and Ko Hyeong-Seok. 2012. Baroclinic Turbulence with Varying Density and Temperature. IEEE Transactions on Visualization and Computer Graphics 18 (2012), 1488-1495.

Theodore Kim, Nils Thürey, Doug James, and Markus Gross. 2008. Wavelet Turbulence for Fluid Simulation. ACM Trans. Graph. 27, 3, Article 50 (August 2008), 6 pages.

Ken Museth. 2013. VDB: High-resolution Sparse Volumes with Dynamic Topology. ACM Trans. Graph. 32, 3 (July 2013).

Sang Il Park and Myoung Jun Kim. 2005. Vortex Fluid for Gaseous Phenomena. In Proceedings of the 2005 ACM SIGGRAPH/Eurographics Symposium on Computer Animation (SCA '05). ACM, 261-270.

Tobias Pfaff, Nils Thuerey, and Markus Gross. 2012. Lagrangian Vortex Sheets for Animating Fluids. ACM Trans. Graph. 31, 4, Article 112 (July 2012), 8 pages.

Tobias Pfaff, Nils Thuerey, Andrew Selle, and Markus Gross. 2009. Synthetic Turbulence Using Artificial Boundary Layers. ACM Trans. Graph. 28, 5, Article 121 (December 2009), 10 pages.

Andrew Selle, Nick Rasmussen, and Ronald Fedkiw. 2005. A Vortex Particle Method for Smoke, Water and Explosions. In ACM SIGGRAPH 2005 Papers (SIGGRAPH '05). ACM, 910-914.

Tarun Kumar Sheel. 2011. Acceleration of Vortex Methods Calculation Using FMM and MDGRAPE-3. Progress In Electromagnetics Research B 27 (2011), 327-348.

SideFX. 2016. Houdini 15.5. (May 2016). https://www.sidefx.com

Jos Stam. 1999. Stable Fluids. In Proceedings of the 26th Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH '99). ACM Press/Addison-Wesley Publishing Co., 121-128.

Adriaan van Oosterom. 2011. Closed-form analytical expressions for the potential fields generated by triangular monolayers with linearly distributed source strength. Medical & Biological Engineering & Computing (MBEC) 50, 1 (October 2011), 1-9.

Adriaan van Oosterom and Jan Strackee. 1983. The solid angle of a plane triangle (IEEE Transactions on Biomedial Engineering), Vol. 30. IEEE, 125-126.

SteffenWeissmann and Ulrich Pinkall. 2010. Filament-based Smoke with Vortex Shedding and Variational Reconnection. ACM Trans. Graph. 29, 4, Article 115 (July 2010), 12 pages.

Magnus Wrenninge. 2016. Efficient Rendering of Volumetric Motion Blur Using Temporally Unstructured Volumes. Journal of Computer Graphics Techniques (JCGT) 5, 1 (January 2016).

Lexing Ying. 2012. A pedestrian introduction to fast multipole methods. Science China Mathematics 55, 5 (2012), 1043-1051.

Xinxin Zhang and Robert Bridson. 2014. A PPPM Fast Summation Method for Fluids and Beyond. ACM Trans. Graph. 33, 6 (November 2014).

APPENDIX 1

Nomenclature

t time Δ_(t) time step p position p_(i) vorticle center {right arrow over (u)} velocity field {right arrow over (h)} harmonic field {right arrow over (ψ)} stream field {right arrow over (ψ)}_(i) vorticle stream field {right arrow over (v)} advected field {right arrow over (v)}_(i) vorticle velocity field {right arrow over (ω)} vorticity field {right arrow over (ω)}_(i) vorticle vorticity field {right arrow over (w)}_(i) vorticle strength r_(i) vorticle size s_(i) vorticle stretching factor E_(i) vorticle mean energy Ω_(i) vorticle enstrophy ρ density field ρ_(A) ambient density field ρ_(j) particle density field m_(j) particle density multiplier {right arrow over (s)} solid objects velocity {right arrow over (f)} solid objects acceleration ν kinematic viscosity {right arrow over (g)} gravity {right arrow over (e)} user external forces Y_(lm) real spherical harmonics P_(lm) Legendre polynomial {right arrow over (μ)}_(lmn) far vector coefficient {right arrow over (κ)}_(lmn) near vector coefficient μ_(lmn) far scalar coefficient κ_(lmn) near scalar coefficient y_(lm) spherical coefficient b_(ln) radial coefficient δΩ boundary surface δΩ_(j) triangle surface σ_(j) source coefficient μ_(j) doublet coefficient S_(j) source field D_(j) doublet field

APPENDIX 2

Field Basis Functions

The first few basis functions are of the form ∥p∥^(n) (n{right arrow over (a)}_(lm)+{right arrow over (b)}_(lm)), and are given in Cartesian coordinates:

$\mspace{20mu}{{\bigtriangledown\left( {{Y_{0,0}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{2}}\sqrt{\frac{1}{4\;\pi}}({np})}}$ $\mspace{20mu}{{\bigtriangledown\left( {{Y_{1,{- 1}}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{3}}\sqrt{\frac{3}{4\;\pi}}\left( {{{- {np}_{y}}p} + {p_{y}p} - {{p}^{2}\overset{\rightarrow}{y}}} \right)}}$ $\mspace{20mu}{{\bigtriangledown\left( {{Y_{1,0}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{3}}\sqrt{\frac{3}{4\;\pi}}\left( {{{np}_{z}p} - {p_{z}p} + {{p}^{2}\overset{\rightarrow}{z}}} \right)}}$ $\mspace{20mu}{{\bigtriangledown\left( {{Y_{1,1}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{3}}\sqrt{\frac{3}{4\;\pi}}\left( {{{- {np}_{x}}p} + {p_{x}p} - {{p}^{2}\overset{\rightarrow}{x}}} \right)}}$ ${\bigtriangledown\left( {{Y_{2,{- 2}}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{4}}\sqrt{\frac{15}{4\;\pi}}\left( {{{np}_{x}p_{y}p} + {{p}^{2}\left( {{p_{y}\overset{\rightarrow}{x}} + {p_{x}\overset{\rightarrow}{y}}} \right)} - {2\; p_{x}p_{y}p}} \right)}$ ${\bigtriangledown\left( {{Y_{2,{- 1}}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{4}}\sqrt{\frac{15}{4\;\pi}}\left( {{{- {np}_{y}}p_{z}p} + {2\; p_{y}p_{z}p} - {{p}^{2}\left( {{p_{z}\overset{\rightarrow}{y}} + {p_{y}\overset{\rightarrow}{z}}} \right)}} \right)}$ ${\bigtriangledown\left( {{Y_{2,0}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{4}}\sqrt{\frac{5}{16\;\pi}}\left( {{{- {n\left( {{3\; p_{z}^{2}} - {p}^{2}} \right)}}p} + {6\;{p_{z}\left( {{p_{z}p} - {{p}^{2}\overset{\rightarrow}{z}}} \right)}}} \right)}$ ${\bigtriangledown\left( {{Y_{2,1}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{4}}\sqrt{\frac{15}{4\;\pi}}\left( {{{np}_{z}p_{x}p} + {{p}^{2}\left( {{p_{x}\overset{\rightarrow}{z}} + {p_{z}\overset{\rightarrow}{x}}} \right)} - {2\; p_{z}p_{x}p}} \right)}$ ${\bigtriangledown\left( {{Y_{2,2}(p)}{p}^{n}} \right)} = {\frac{{p}^{n}}{{p}^{4}}\sqrt{\frac{15}{4\;\pi}}\left( {{n\frac{p_{x}^{2} - p_{y}^{2}}{2}p} + {{p}^{2}\left( {{p_{x}\overset{\rightarrow}{x}} - {p_{z}\overset{\rightarrow}{y}}} \right)} + {\left( {p_{y}^{2} - p_{x}^{2}} \right)p}} \right)}$

APPENDIX 3

First Vorticle to Far Coefficient

The far radial coefficients b_(ln) multiply the radial part of the basis:

$\begin{matrix} {B_{l} = {\sum\limits_{n = 1}^{\infty}\;{b_{\ln}\frac{1}{r^{n}}}}} & (49) \end{matrix}$

For a cell centered a c, and d_(i)=∥p_(i)−c∥, the first few far radial coefficients b_(ln) are:

$\begin{matrix} {{{B_{0}\left( {r,d_{i}} \right)} = {\frac{1}{r} - \frac{r_{i}^{2}}{2\; r^{3}} + \frac{{{- 4}\; d_{i}^{2}r_{i}^{2}} + {3\; r_{i}^{4}}}{8\; r^{5}} + {O\left( \frac{1}{r^{7}} \right)}}}{{B_{1}\left( {r,d_{i}} \right)} = {\frac{d_{i}}{r^{2}} - \frac{3\; d_{i}r_{i}^{2}}{2\; r^{4}} - \frac{3\;{d_{i}\left( {{4\; d_{i}^{2}r_{i}^{2}} - {5\; r_{i}^{4}}} \right)}}{8\; r^{6}} + {O\left( \frac{1}{r^{7}} \right)}}}{{B_{2}\left( {r,d_{i}} \right)} = {\frac{d_{i}^{2}}{r^{3}} - \frac{5\; d_{i}^{2}r_{i}^{2}}{2\; r^{5}} + {O\left( \frac{1}{r^{7}} \right)}}}} & (50) \end{matrix}$

The first few spherical coefficients are:

$\begin{matrix} {{y_{0,0} = \sqrt{4\;\pi}}{y_{1,{- 1}} = {{- \sqrt{\frac{4\;\pi}{3}}}\frac{p_{iy}}{p_{i}}}}{y_{1,0} = {\sqrt{\frac{4\;\pi}{3}}\frac{p_{iz}}{p_{i}}}}{y_{1,1} = {{- \sqrt{\frac{4\;\pi}{3}}}\frac{p_{ix}}{p_{i}}}}{y_{2,{- 2}} = {\sqrt{\frac{12\;\pi}{5}}\frac{p_{ix}p_{iy}}{{p_{i}}^{2}}}}{y_{2,{- 1}} = {{- \sqrt{\frac{12\;\pi}{5}}}\frac{p_{iy}p_{iz}}{{p_{i}}^{2}}}}{y_{2,0} = {{- \sqrt{\frac{\pi}{5}}}\left( {1 - {3\frac{p_{iz}^{2}}{{p_{i}}^{2}}}} \right)}}{y_{2,1} = {{- \sqrt{\frac{12\;\pi}{5}}}\frac{p_{ix}p_{iz}}{{p_{i}}^{2}}}}{y_{2,2} = {\sqrt{\frac{3\;\pi}{5}}\frac{\left( {p_{ix}^{2} - p_{iy}^{2}} \right)}{{p_{i}}^{2}}}}} & (51) \end{matrix}$

APPENDIX 4

First Far Coefficient Translation

The first few coefficients:

$\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{0,0,1}^{\prime} = {\overset{\rightarrow}{\mu}}_{0,0,1}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{0,0,2}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{0,0,3}^{\prime} = {\overset{\rightarrow}{\mu}}_{0,0,3}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,{- 1},1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,{- 1},2}^{\prime} = {{\overset{\rightarrow}{\mu}}_{1,{- 1},2}^{\prime} + {\sqrt{\frac{1}{3}}c_{y}{\overset{\rightarrow}{\mu}}_{0,0,1}}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,{- 1},3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,0,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,0,2}^{\prime} = {{\overset{\rightarrow}{\mu}}_{1,0,2}^{\prime} - {\sqrt{\frac{1}{3}}c_{z}{\overset{\rightarrow}{\mu}}_{0,0,1}}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,0,3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,1,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,1,2}^{\prime} = {{\overset{\rightarrow}{\mu}}_{1,1,2} + {\sqrt{\frac{1}{3}}c_{x}{\overset{\rightarrow}{\mu}}_{0,0,1}}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{1,1,3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,{- 2},1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,{- 2},2}^{\prime} = 0}$ ${\overset{\rightarrow}{\mu}}_{2,{- 2},3}^{\prime} = {{\overset{\rightarrow}{\mu}}_{2,{- 2},3}^{\prime} + {\sqrt{\frac{3}{5}}c_{x}c_{y}{\overset{\rightarrow}{\mu}}_{0,0,1}} + {\sqrt{\frac{9}{5}}c_{x}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{\frac{9}{5}}c_{y}{\overset{\rightarrow}{\mu}}_{1,1,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,{- 1},1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,{- 1},2}^{\prime} = 0}$ ${\overset{\rightarrow}{\mu}}_{2,{- 1},3}^{\prime} = {{\overset{\rightarrow}{\mu}}_{2,{- 1},3}^{\prime} - {\sqrt{\frac{3}{5}}c_{y}c_{z}{\overset{\rightarrow}{\mu}}_{0,0,1}} - {\sqrt{\frac{9}{5}}c_{z}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{\frac{9}{5}}c_{y}{\overset{\rightarrow}{\mu}}_{1,0,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,0,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,0,2}^{\prime} = 0}$ ${\overset{\rightarrow}{\mu}}_{2,0,3}^{\prime} = {{\overset{\rightarrow}{\mu}}_{2,0,3}^{\prime} - {\sqrt{\frac{1}{20}}\left( {c_{x}^{2} + c_{y}^{2} - {2\; c_{z}^{2}}} \right){\overset{\rightarrow}{\mu}}_{0,0,1}} - {\sqrt{\frac{3}{5}}c_{y}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} - {\sqrt{\frac{12}{5}}c_{z}{\overset{\rightarrow}{\mu}}_{1,0,2}} - {\sqrt{\frac{3}{5}}c_{x}{\overset{\rightarrow}{\mu}}_{1,1,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,1,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,1,2}^{\prime} = 0}$ ${\overset{\rightarrow}{\mu}}_{2,1,3}^{\prime} = {{\overset{\rightarrow}{\mu}}_{2,1,3} - {\sqrt{\frac{3}{5}}c_{x}c_{z}{\overset{\rightarrow}{\mu}}_{0,0,1}} + {\sqrt{\frac{9}{5}}c_{x}{\overset{\rightarrow}{\mu}}_{1,0,2}} - {\sqrt{\frac{9}{5}}c_{z}{\overset{\rightarrow}{\mu}}_{1,1,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,2,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\mu}}_{2,2,2}^{\prime} = 0}$ ${\overset{\rightarrow}{\mu}}_{2,2,3}^{\prime} = {{\overset{\rightarrow}{\mu}}_{2,2,3}^{\prime} + {\sqrt{\frac{3}{20}}\left( {c_{x}^{2} - c_{y}^{2}} \right){\overset{\rightarrow}{\mu}}_{0,0,1}} - {\sqrt{\frac{9}{5}}c_{y}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{\frac{9}{5}}c_{x}{\overset{\rightarrow}{\mu}}_{1,1,2}}}$

APPENDIX 5

First Far to Near Coefficient Transformation

The coefficients transforms simplify, and are precomputed and stored before running the simulation. This optimization is worth it since there is at most 189 far interacting cells.

${\overset{\rightarrow}{\kappa}}_{0,0,0}^{\prime} = {{\frac{1}{c}{\overset{\rightarrow}{\mu}}_{0,0,1}} + {\frac{1}{{c}^{3}}{\overset{\rightarrow}{\mu}}_{0,0,3}} - {\sqrt{3}\frac{c_{y}}{{c}^{3}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{3}\frac{c_{z}}{{c}^{3}}{\overset{\rightarrow}{\mu}}_{1,0,2}} - {\sqrt{3}\frac{c_{x}}{{c}^{3}}{\overset{\rightarrow}{\mu}}_{1,1,2}} - {\sqrt{\frac{5}{4}}\frac{{c}^{2} - {3\; c_{z}^{2}}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{2,0,3}} + {\sqrt{15}\frac{c_{x}c_{y}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} - {\sqrt{15}\frac{c_{y}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} - {\sqrt{15}\frac{c_{x}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{2,1,3}} + {\sqrt{\frac{15}{4}}\frac{c_{x}^{2} - c_{y}^{2}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{0,0,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{0,0,2}^{\prime} = {\frac{1}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{0,0,3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,{- 1},0}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{1,{- 1},1}^{\prime} = {{\sqrt{\frac{1}{3}}\frac{c_{y}}{{c}^{3}}{\overset{\rightarrow}{\mu}}_{0,0,1}} + {\sqrt{3}\frac{c_{y}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,3}} + {\frac{{c}^{2} - {3\; c_{y}^{2}}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {3\frac{c_{y}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,0,2}} - {3\frac{c_{x}c_{y}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,1,2}} - {\sqrt{5}\frac{c_{x}\left( {{c}^{2} - {5\; c_{y}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} + {\sqrt{5}\frac{c_{z}\left( {{c}^{2} - {5\; c_{y}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} - {\sqrt{\frac{15}{4}}\frac{c_{y}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,0,3}} - {\sqrt{125}\frac{c_{x}c_{y}c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,1,3}} + {\sqrt{\frac{5}{4}}\frac{c_{y}\left( {{2{c}^{2}} + {5\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,{- 1},2}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}^{\prime} = {\sqrt{3}\frac{c_{y}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,0,0}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{1,0,1}^{\prime} = {{{- \sqrt{\frac{1}{3}}}\frac{c_{z}}{{c}^{3}}{\overset{\rightarrow}{\mu}}_{0,0,1}} - {\sqrt{3}\frac{c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,3}} + {3\frac{c_{y}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\frac{{c}^{2} - {3\; c_{z}^{2}}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,0,2}} + {3\frac{c_{x}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,1,2}} - {\sqrt{125}\frac{c_{x}c_{y}c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} - {\sqrt{5}\frac{c_{y}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} + {\sqrt{\frac{15}{4}}\frac{c_{z}\left( {{3{c}^{2}} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,0,3}} - {\sqrt{5}\frac{c_{x}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,1,3}} - {\sqrt{\frac{125}{4}}\frac{c_{z}\left( {c_{x}^{2} - c_{y}^{2}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,0,2}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,0,3}^{\prime} = {{- \sqrt{3}}\frac{c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,1,0}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{1,1,1}^{\prime} = {{{- \sqrt{\frac{1}{3}}}\frac{c_{x}}{{c}^{3}}{\overset{\rightarrow}{\mu}}_{0,0,1}} + {\sqrt{3}\frac{c_{x}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,3}} - {3\frac{c_{x}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {3\frac{c_{x}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,0,2}} + {\frac{{c}^{2} - {3\; c_{x}^{2}}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{1,1,2}} - {\sqrt{5}\frac{c_{y}\left( {{c}^{2} - {5\; c_{x}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} - {\sqrt{125}\frac{c_{x}c_{y}c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} - {\sqrt{\frac{15}{4}}\frac{c_{x}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,0,3}} + {\sqrt{5}\frac{c_{z}\left( {{c}^{2} - {5\; c_{x}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,1,3}} + {\sqrt{\frac{5}{4}}\frac{c_{x}\left( {{{- 2}{c}^{2}} + {5\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,1,2}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,1,3}^{\prime} = {\sqrt{3}\frac{c_{x}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}}}$

$\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,{- 2},0} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,{- 2},1} = 0}$ ${\overset{\rightarrow}{k}}_{2,{- 2},2} = {{\sqrt{\frac{3}{5}}\frac{c_{x}c_{y}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,1}} + {\sqrt{15}\frac{c_{x}c_{y}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}} + {\sqrt{\frac{9}{5}}\frac{c_{x}\left( {{c}^{2} - {5\; c_{y}^{2}}} \right.}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{45}\frac{c_{x}c_{y}c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,0,2}} + {\sqrt{\frac{9}{5}}\frac{c_{y}\left( {{c}^{2} - {5\; c_{x}^{2}}} \right.}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\frac{{{- 4}{c}^{4}} + {5\; c_{z}^{2}{c}^{2}} + {35\; c_{x}^{2}c_{y}^{2}}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} + {5\;\frac{c_{x}{c_{z}\left( {{c}^{2} - {7\; c_{y}^{2}}} \right.}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}\sqrt{\frac{75}{4}}\frac{c_{x}{c_{y}\left( {{c}^{2} - {7\; c_{z}^{2}}} \right.}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,0,3}} + {5\;\frac{c_{y}{c_{z}\left( {{c}^{2} - {7\; c_{x}^{2}}} \right.}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} + {\frac{35}{2}\frac{c_{x}{c_{y}\left( {c_{x}^{2} - c_{y}^{2}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,{- 2},3} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,{- 1},0} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,{- 1.1}} = 0}$ ${\overset{\rightarrow}{k}}_{2,{- 1},2} = {{\sqrt{\frac{3}{5}}\frac{c_{y}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,1}} - {\sqrt{15}\frac{c_{y}c_{z}}{/{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}} - {\sqrt{\frac{9}{5}}\frac{c_{z}\left( {{c}^{2} - {5\; c_{y}^{2}}} \right.}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{\frac{9}{5}}\frac{c_{y}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right.}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,0,2}} + {\sqrt{45}\frac{c_{x}c_{y}c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,1,2}} + {5\;\frac{c_{x}{c_{z}\left( {{c}^{2} - {7\; c_{y}^{2}}} \right.}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} + {\frac{{{- 4}{c}^{4}} + {5\; c_{x}^{2}{c}^{2}} + {35\; c_{y}^{2}c_{z}^{2}}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}\sqrt{\frac{75}{4}}\frac{c_{y}{c_{z}\left( {{3{c}^{2}} - {7\; c_{z}^{2}}} \right.}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,1,3}} - {5\;\frac{c_{x}{c_{y}\left( {{c}^{2} - {7\; c_{z}^{2}}} \right.}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}\frac{5}{2}\;\frac{c_{y}{c_{z}\left( {{{- 2}{c}^{2}} - {7\;\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,{- 1},3} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,0,0} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{k}}_{2,0,1} = 0}$ ${\overset{\rightarrow}{\kappa}}_{2,0,2}^{\prime} = {{{- \sqrt{\frac{1}{20}}}\frac{{c}^{2} - {3\; c_{z}^{2}}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,1}} - {\sqrt{\frac{5}{4}}\frac{{c}^{2} - {3\; c_{z}^{2}}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}} + {\sqrt{\frac{27}{20}}\frac{c_{y}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{\frac{27}{20}}\frac{c_{z}\left( {{{- 3}{c}^{2}} + {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,0,2}} + {\sqrt{\frac{27}{20}}\frac{c_{x}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,1,2}} - {\sqrt{\frac{75}{4}}\frac{c_{x}{c_{y}\left( {{c}^{2} - {7c_{z}^{2}}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} + {\sqrt{\frac{75}{4}}\frac{c_{y}{c_{z}\left( {{3{c}^{2}} - {7c_{z}^{2}}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}\frac{3}{4}\frac{{3{c}^{4}} - {30{c}^{2}c_{z}^{2}} + {35\; c_{z}^{4}}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,0,3}} + {\sqrt{\frac{75}{4}}\frac{c_{x}{c_{z}\left( {{3{c}^{2}} - {7c_{z}^{2}}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,1,3}} - {\sqrt{\frac{75}{16}}\frac{\left( {c_{x}^{2} - c_{y}^{2}} \right)\left( {{c}^{2} - {7c_{z}^{2}}} \right)}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,0,3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,1,0}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,1,1}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{2,1,2}^{\prime} = {{{- \sqrt{\frac{3}{5}}}\frac{c_{x}c_{z}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,1}} - {\sqrt{15}\frac{c_{x}c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}} + {\sqrt{45}\frac{c_{x}c_{y}c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + \;{\sqrt{\frac{9}{5}}\frac{c_{x}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,0,2}} - {\sqrt{\frac{9}{5}}\frac{c_{z}\left( {{c}^{2} - {5\; c_{z}^{2}}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,1,2}} + {5\;\frac{c_{y}{c_{z}\left( {{c}^{2} - {7\; c_{x}^{2}}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} - {5\;\frac{c_{x}{c_{y}\left( {{c}^{2} - {7\; c_{z}^{2}}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} + {\sqrt{\frac{75}{4}}\frac{c_{x}{c_{z}\left( {{3{c}^{2}} - {7\; c_{z}^{2}}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,0,3}} + {\frac{{{- 4}{c}^{4}} + {5\left( {{c_{y}^{2}{c}^{2}} + {7\; c_{x}^{2}c_{z}^{2}}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,1,3}} + {\frac{5}{2}\;\frac{c_{x}{c_{z}\left( {{2{c}^{2}} - {7\;\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 1},3} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,2,0} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,2,1} = 0}$ ${\overset{\rightarrow}{\kappa}}_{2,2,2}^{\prime} = {{\sqrt{\frac{3}{20}}\frac{c_{x}^{2} - \; c_{y}^{2}}{{c}^{5}}{\overset{\rightarrow}{\mu}}_{0,0,1}} + {\sqrt{\frac{15}{4}}\frac{c_{x}^{2} - \; c_{y}^{2}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{0,0,3}} + {\sqrt{\frac{9}{20}}\frac{c_{y}\left( {{{- 2}{c}^{2}} - {5\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,{- 1},2}} + {\sqrt{\frac{45}{4}}\frac{\left( {c_{x}^{2} - c_{y}^{2}} \right)c_{z}}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,0,2}} + {\sqrt{\frac{9}{20}}\frac{c_{x}\left( {{2{c}^{2}} - {5\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}{{c}^{7}}{\overset{\rightarrow}{\mu}}_{1,1,2}} + {\frac{35}{2}\frac{c_{x}{c_{y}\left( {c_{x}^{2} - c_{y}^{2}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 2},3}} + {\frac{5}{2}\frac{c_{y}{c_{x}\left( {{{- 2}{c}^{2}} - {7\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} - {\sqrt{\frac{75}{16}}\frac{\left( {c_{x}^{2} - c_{y}^{2}} \right)\left( {{c}^{2} - {7\; c_{z}^{2}}} \right)}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,0,3}} + {\frac{5}{2}\frac{x\;{c_{z}\left( {{{- 2}{c}^{2}} - {7\left( {c_{x}^{2} - c_{y}^{2}} \right)}} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,{- 1},3}} + {\frac{1}{4}\frac{{19{c}^{4}} - {50{c}^{2}c_{x}^{2}c_{y}^{2}} + {35\left( c_{z}^{4} \right)}}{{c}^{9}}{\overset{\rightarrow}{\mu}}_{2,2,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,2,3}^{\prime} = 0}$

APPENDIX 6

First Near Coefficient Translation

The coefficients simplify, and the first few are:

${\overset{\rightarrow}{\kappa}}_{0,0,0}^{\prime} = {{\overset{\rightarrow}{\kappa}}_{0,0,0} + {{c}^{2}{\overset{\rightarrow}{\kappa}}_{0,0,2}} - {\sqrt{3}c_{y}{\overset{\rightarrow}{\kappa}}_{1,{- 1},1}} - {\sqrt{3}c_{y}{c}^{2}{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}} + {\sqrt{3}c_{z}{\overset{\rightarrow}{\kappa}}_{1,0,1}} + {\sqrt{3}c_{z}{c}^{2}{\overset{\rightarrow}{\kappa}}_{1,0,3}} - {\sqrt{3}c_{x}{\overset{\rightarrow}{\kappa}}_{1,1,1}} - {\sqrt{3}c_{x}{c}^{2}{\overset{\rightarrow}{\kappa}}_{1,1,3}} + {\sqrt{15}c_{x}c_{y}{\overset{\rightarrow}{\kappa}}_{2,{- 2},2}} - {\sqrt{15}c_{y}c_{z}{\overset{\rightarrow}{\kappa}}_{2,{- 1},2}} - {\sqrt{\frac{5}{4}}\left( {{c}^{2} - {3\; c_{z}^{2}}} \right){\overset{\rightarrow}{\kappa}}_{2,0,2}} - {\sqrt{15}c_{x}c_{z}{\overset{\rightarrow}{\kappa}}_{2,1,2}} + {\sqrt{\frac{15}{4}}\left( {c_{x}^{2} - c_{y}^{2}} \right){\overset{\rightarrow}{\kappa}}_{2,2,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{0,0,1}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{0,0,2}^{\prime} = {{\overset{\rightarrow}{\kappa}}_{0,0,2} - {\sqrt{\frac{25}{3}}c_{y}{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}} + {\sqrt{\frac{25}{3}}c_{z}{\overset{\rightarrow}{\kappa}}_{1,0,3}} - {\sqrt{\frac{25}{3}}c_{x}{\overset{\rightarrow}{\kappa}}_{1,1,3}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{0,0,3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,{- 1},0}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{1,{- 1},1}^{\prime} = {{{- \sqrt{\frac{4}{3}}}c_{y}{\overset{\rightarrow}{\kappa}}_{0,0,2}} + {\overset{\rightarrow}{\kappa}}_{1,{- 1},1} + {\left( {{c}^{2} + {2\; c_{y}^{2}}} \right){\overset{\rightarrow}{\kappa}}_{1,{- 1},3}} - {2\; c_{y}c_{z}{\overset{\rightarrow}{\kappa}}_{1,0,3}} + {2\; c_{x}c_{y}{\overset{\rightarrow}{\kappa}}_{1,1,3}} - {\sqrt{5}c_{x}{\overset{\rightarrow}{\kappa}}_{2,{- 2},2}} + {\sqrt{5}c_{z}{\overset{\rightarrow}{\kappa}}_{2,{- 1},2}} + {\sqrt{\frac{5}{3}}c_{y}{\overset{\rightarrow}{\kappa}}_{2,0,2}^{\prime}} + {\sqrt{5}c_{y}{\overset{\rightarrow}{\kappa}}_{2,2,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,{- 1},2}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}^{\prime} = {\overset{\rightarrow}{\kappa}}_{1,{- 1},3}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,0,0}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{1,0,1}^{\prime} = {{\sqrt{\frac{4}{3}}c_{z}{\overset{\rightarrow}{\kappa}}_{0,0,2}} - {2\; c_{y}c_{z}{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}} + {\overset{\rightarrow}{\kappa}}_{1,0,1} + {\left( {{c}^{2} + {2\; c_{z}^{2}}} \right){\overset{\rightarrow}{\kappa}}_{1,0,3}} - {2\; c_{x}c_{z}{\overset{\rightarrow}{\kappa}}_{1,1,3}} - {\sqrt{5}c_{y}{\overset{\rightarrow}{\kappa}}_{2,{- 1},2}} + {\sqrt{\frac{20}{3}}c_{z}{\overset{\rightarrow}{\kappa}}_{2,0,2}} - {\sqrt{5}c_{x}{\overset{\rightarrow}{\kappa}}_{2,1,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,0,2}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,0,3}^{\prime} = {\overset{\rightarrow}{\kappa}}_{1,0,3}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,1,0}^{\prime} = 0}$ ${\overset{\rightarrow}{\kappa}}_{1,1,1}^{\prime} = {{{- \sqrt{\frac{4}{3}}}c_{x}{\overset{\rightarrow}{\kappa}}_{0,0,2}} + {2\; c_{x}c_{y}{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}} - {2\; c_{x}c_{z}{\overset{\rightarrow}{\kappa}}_{1,0,3}} + {\overset{\rightarrow}{\kappa}}_{1,1,1} + {\left( {{c}^{2} + {2\; c_{x}^{2}}} \right){\overset{\rightarrow}{\kappa}}_{1,1,3}} - {\sqrt{5}c_{y}{\overset{\rightarrow}{\kappa}}_{2,{- 2},2}} + {\sqrt{\frac{5}{3}}c_{x}{\overset{\rightarrow}{\kappa}}_{2,0,2}} + {\sqrt{5}c_{z}{\overset{\rightarrow}{\kappa}}_{2,1,2}} - {\sqrt{5}c_{x}{\overset{\rightarrow}{\kappa}}_{2,2,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,1,2}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{1,1,3}^{\prime} = {\overset{\rightarrow}{\kappa}}_{1,1,3}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 2},0}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 2},1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 2},2}^{\prime} = {{{- \sqrt{\frac{4}{5}}}c_{x}{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}} - {\sqrt{\frac{4}{5}}c_{y}{\overset{\rightarrow}{\kappa}}_{1,1,3}} + {\overset{\rightarrow}{\kappa}}_{2,{- 2},2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 2},3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 1},0}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 1},1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 1},2}^{\prime} = {{{- \sqrt{\frac{4}{5}}}c_{z}{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}^{\prime}} - {\sqrt{\frac{4}{5}}c_{y}{\overset{\rightarrow}{\kappa}}_{1,0,3}^{\prime}} + {\overset{\rightarrow}{\kappa}}_{2,{- 1},2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,{- 1},3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,0,0}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,0,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,0,2}^{\prime} = {{\sqrt{\frac{4}{15}}c_{y}{\overset{\rightarrow}{\kappa}}_{1,{- 1},3}} - {\sqrt{\frac{16}{15}}c_{z}{\overset{\rightarrow}{\kappa}}_{1,0,3}} + {\sqrt{\frac{4}{15}}c_{x}{\overset{\rightarrow}{\kappa}}_{1,1,3}} + {\overset{\rightarrow}{\kappa}}_{2,0,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,0,3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,1,0}^{\prime} = 0}$ $\mspace{79mu}{{\overset{\rightarrow}{\kappa}}_{2,1,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,1,2}^{\prime} = {{{- \sqrt{\frac{4}{5}}}c_{x}{\overset{\rightarrow}{\kappa}}_{1,0,3}} + {\sqrt{\frac{4}{5}}c_{z}{\overset{\rightarrow}{\kappa}}_{1,1,3}} + {\overset{\rightarrow}{\kappa}}_{2,1,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,1.3}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,2,0}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,2,1}^{\prime} = 0}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,2,2}^{\prime} = {{\sqrt{\frac{4}{5}}c_{y}{\overset{\rightarrow}{\kappa}}_{1,{- {,3}}}} - {\sqrt{\frac{4}{5}}c_{x}{\overset{\rightarrow}{\kappa}}_{1,1,3}} + {\overset{\rightarrow}{\kappa}}_{2,2,2}}}$ $\mspace{20mu}{{\overset{\rightarrow}{\kappa}}_{2,2,3}^{\prime} = 0}$

APPENDIX 7

Buoyancy

The vorticity induced by buoyancy can be computed directly by sampling everywhere in R³ the buoyancy term with vorticles. But this laborious integral can be avoided, since buoyancy vorticity is concentrated near places of varying density and where the density gradient and buoyant acceleration are perpendicular. First, a set of vorticles can be associated with a single particle j, which can be generalized to multiple density particles. Let us define a local

coordinate system centered at x_(j) such that {right arrow over (z)} is aligned with

$\overset{\rightarrow}{g} + \overset{\rightarrow}{e} - {\frac{d\;\overset{\rightarrow}{u}}{dt}.}$ For a density particle or radius r_(j), it can be expected that the vorticles induced by buoyancy are concentrated around a ring {x_(α), α∈2π} of diameter r_(j), perpendicular to vector unit {right arrow over (z)}, with an axis {right arrow over (n)}_(α). In local coordinates:

$\begin{matrix} {{x_{\alpha} = {\frac{r_{j}}{2}\left( {{\cos(\alpha)},{\sin(\alpha)},0} \right)}}{{\overset{\rightarrow}{n}}_{\alpha} = {\left( {{- {\sin(\alpha)}},{\cos(\alpha)},0} \right).}}} & (52) \end{matrix}$

For a canonical density particle, the following density field may be used:

$\begin{matrix} {{\hat{\rho}}_{j} = {\exp\left( \left( {1 + {\kappa_{1}\frac{x \cdot x}{2r_{j}^{2}}}} \right)^{- \kappa_{2}} \right)}} & (53) \end{matrix}$ The parameters κ₀, κ₁ and κ₂ may be fitted using the following equation: ∇ log({circumflex over (ρ)}_(j))×{right arrow over (z)}=r _(j) ²κ₀∇×(∫_(α)ξ_(i)(p−x _(α))³ {right arrow over (n)} _(α)×(p−x _(α))dα).   (54) The following parameters may be obtained: κ₀=0.493483 κ₁=0.572636 κ₂=3.423340  (55)

FIG. 26A shows two almost exactly overlapping curves of the largest component of the left (red) and right (blue) side of Eq. (54) according to some embodiments. FIG. 26B shows the density field ρ_(j) for r_(j)=1 and m_(j)=1. The density fits the closed form integral with a third decimal accuracy on all 3 vector components.

To generalize to multiple particles, {circumflex over (ρ)}_(j) can be remapped to values in (0, m_(j)) so that densities can be added, and the field of a single particle density

$\rho_{j} = {m_{j}\frac{{\hat{\rho}}_{j} - 1}{e - 1}}$ can be obtained. Since

${{\frac{\nabla\rho}{\rho} \times \overset{\rightarrow}{z}} = {\sum{\frac{m_{j}}{e - 1}\frac{{\hat{\rho}}_{j}}{\rho}{\nabla{\log\left( {\hat{\rho}}_{j} \right)}} \times \overset{\rightarrow}{z}}}},$ a set of weights can be obtained that modulate the rotations of the vorticles induced by the density particle j, that accounts for acceleration and multiple particles:

$\begin{matrix} {{\overset{\rightarrow}{w}}_{\alpha} = {r_{j}^{2}\kappa_{0}\frac{\pi}{n}{{\overset{\rightarrow}{g} + \overset{\rightarrow}{e} - \frac{d\overset{\rightarrow}{u}}{dt}}}\frac{m_{j}}{e - 1}\frac{{\hat{\rho}}_{j}\left( x_{\alpha} \right)}{\rho\left( x_{\alpha} \right)}{\overset{\rightarrow}{n}}_{\alpha}}} & (56) \end{matrix}$

APPENDIX 8

Boundary Vorticity

The vorticity near the boundary δΩ of a moving object is given by ∇log(ρ)×({right arrow over (F)}−{right arrow over (a)})+∇×{right arrow over (F)}, where {right arrow over (a)} is the acceleration near the boundary. To compute this term, one may consider a coordinate system where the half space z<0 is inside the solid object, z=0 in on the object's surface, and z>0 is outside. Using the Heavyside step function H, the nearby density is formally defined as ρ=H(−z)ρ₀+H(z)ρ₁, the external forces term is defined as {right arrow over (F)}=H(−z){right arrow over (f)}+H(z)({right arrow over (g)}+{right arrow over (e)}), and the acceleration is

$\overset{\rightarrow}{a} = {{{H\left( {- z} \right)}\overset{\rightarrow}{f}} + {{H(z)}{\frac{d\overset{\rightarrow}{u}}{dt}.}}}$ Since vorticity is solved for, {right arrow over (F)} can be replaced with any {right arrow over (F)}+{right arrow over (G)} to satisfy the boundary condition as long as ∇×{right arrow over (G)}=0 outside of solid objects. First let us consider the following {right arrow over (G)}:

$\begin{matrix} {\overset{\rightarrow}{G} = {{{H(z)}\left( {\frac{d\overset{\rightarrow}{u}}{dt} - \overset{\rightarrow}{g} - {\frac{1}{2}\overset{\rightarrow}{e}}} \right)} - {\frac{1}{2}{\overset{\rightarrow}{e}.}}}} & (57) \end{matrix}$

Although

$\frac{d\overset{\rightarrow}{u}}{dt}$ may have curl, the object surface may be discretized in regions of constant

$\frac{d\overset{\rightarrow}{u}}{dt}.$ To prevent the space inside objects from participating to the non-rigid fluid motion, one may set ρ₀→∞, thus enforcing {right arrow over (f)} inside objects. One may take the limit of the integral of the collision term near the surface, using the following limit to the Heavyside step function

${{H(z)} = {{\lim\limits_{t->\infty}\frac{1}{2}} + {\frac{1}{\pi}{\tan^{- 1}({zt})}}}},$ and obtain the surface vorticity:

$\begin{matrix} {{{\lim\limits_{\rho_{0}->\infty}{\lim\limits_{t->\infty}{\int_{- h}^{h}{{\nabla{\log(\rho)}} \times \left( {\overset{\rightarrow}{F} + \overset{\rightarrow}{G} - \frac{d\overset{\rightarrow}{u}}{dt}} \right)}}}} + {\nabla{\times \left( {\overset{\rightarrow}{F} + \overset{\rightarrow}{G}} \right){dz}}}} = {\left( {\overset{\rightarrow}{f} - \overset{\rightarrow}{e} - \overset{\rightarrow}{a}} \right) \times \overset{\rightarrow}{n}}} & (58) \end{matrix}$

APPENDIX 9

Source Fields

The source integral of Eq. (26) is given by van Oosterom [2011]. Below are the formula of the source panel field S, and its derivative ∇S, for a triangle defined by {p₀, p₁, p₂}, using the symbols of Eq. (60):

$\begin{matrix} {{{S(p)} = {\frac{1}{\overset{\rightarrow}{n}}\left( {{\frac{\overset{\rightarrow}{n} \cdot \left( {{\overset{\rightarrow}{d}}_{1} \times {\overset{\rightarrow}{d}}_{2}} \right)}{e_{0}}{\log\left( \frac{f_{0}}{g_{0}} \right)}} + {\frac{\overset{\rightarrow}{n} \cdot \left( {{\overset{\rightarrow}{d}}_{2} \times {\overset{\rightarrow}{d}}_{0}} \right)}{e_{1}}{\log\left( \frac{f_{1}}{g_{1}} \right)}} + {\frac{\overset{\rightarrow}{n} \cdot \left( {{\overset{\rightarrow}{d}}_{0} \times {\overset{\rightarrow}{d}}_{1}} \right)}{e_{2}}{\log\left( \frac{f_{2}}{g_{2}} \right)}} - {2k_{1}a\;\tan\; 2\left( {k_{1},k_{0}} \right)}} \right)}}{{\nabla{S(p)}} = {\frac{1}{\overset{\rightarrow}{n}}\left( {{\left( {\overset{\rightarrow}{n} \cdot \left( {{\overset{\rightarrow}{d}}_{1} \times {\overset{\rightarrow}{d}}_{2}} \right)} \right){\overset{\rightarrow}{h}}_{0}} + {\frac{\left( {{\overset{\rightarrow}{d}}_{1} - {\overset{\rightarrow}{d}}_{2}} \right) \times \overset{\rightarrow}{n}}{e_{0}}{\log\left( \frac{f\; 0}{g\; 0} \right)}} + {\left( {\overset{\rightarrow}{n} \cdot \left( {{\overset{\rightarrow}{d}}_{2} \times {\overset{\rightarrow}{d}}_{0}} \right)} \right){\overset{\rightarrow}{h}}_{1}} + {\frac{\left( {{\overset{\rightarrow}{d}}_{2} - {\overset{\rightarrow}{d}}_{0}} \right) \times \overset{\rightarrow}{n}}{e_{1}}{\log\left( \frac{f\; 1}{g\; 1} \right)}} + {\left( {\overset{\rightarrow}{n} \cdot \left( {{\overset{\rightarrow}{d}}_{0} \times {\overset{\rightarrow}{d}}_{1}} \right)} \right){\overset{\rightarrow}{h}}_{2}} + {\frac{\left( {{\overset{\rightarrow}{d}}_{0} - {\overset{\rightarrow}{d}}_{1}} \right) \times \overset{\rightarrow}{n}}{e_{2}}{\log\left( \frac{f\; 2}{g\; 2} \right)}} + {{D(p)}\overset{\rightarrow}{n}} + {k_{1}{\nabla{D(p)}}}} \right)}}} & (59) \end{matrix}$ The symbols above are defined as:

$\begin{matrix} {{{\overset{\rightarrow}{n} = {\left( {p_{1} - p_{0}} \right) \times \left( {p_{2} - p_{0}} \right)}}{{\overset{\rightarrow}{d}}_{i} = {p_{i} - p}}{l_{i} = {{\overset{\rightarrow}{d}}_{i}}}{k_{0} = {{l_{0}l_{1}l_{2}} + {l_{0}{{\overset{\rightarrow}{d}}_{1} \cdot {\overset{\rightarrow}{d}}_{2}}} + {l_{1}{{\overset{\rightarrow}{d}}_{2} \cdot {\overset{\rightarrow}{d}}_{0}}} + {l_{2}{{\overset{\rightarrow}{d}}_{0} \cdot {\overset{\rightarrow}{d}}_{1}}}}}{k_{1} = {\left( {{\overset{\rightarrow}{d}}_{2} \times {\overset{\rightarrow}{d}}_{1}} \right) \cdot {\overset{\rightarrow}{d}}_{0}}}{e_{i} = {{p_{j} - p_{k}}}}{f_{i} = {l_{j} + l_{k} + e_{i}}}{g_{i} = {l_{j} + l_{k} - e_{i}}}{{\overset{\rightarrow}{h}}_{i} = {\frac{2}{f_{i}g_{i}}\left( {\frac{{\overset{\rightarrow}{d}}_{j}}{l_{j}} + \frac{{\overset{\rightarrow}{d}}_{k}}{l_{k}}} \right)}}j = {\left( {i + 1} \right)\mspace{14mu}{\% 3}}}{k = {\left( {i + 2} \right)\mspace{14mu}{\% 3}}}} & (60) \end{matrix}$

The function ∇S(p) is numerically unstable when p is aligned with the edges. This corresponds to a situation where some triangles in the decomposition of Carley [2012] are very thin. FIGS. 27A-27D illustrate that the integral over any triangle can be decomposed into 6 right-angle triangle integrals. FIG. 27A shows that point p is the projection of the evaluation point p onto the plane of the triangle. FIG. 27B shows that the triangle is split into three signed triangles with a corner at p. FIG. 27C shows that each triangle is split into two signed right angle triangles. FIG. 27D shows that the integral of a piece is evaluated with p as the origin and an axis aligned triangle.

Using this decomposition, the thin triangles may be eliminated. The source field induced at a point p located on the z axis by a triangle with a right angle at p₀ lying in the plane z=0 with corner p₂ located at the origin is given by: ∇{tilde over (S)}(p)_(x)=arctanh(k ₁ /k ₂)+k ₁ k ₇ ∇{tilde over (S)}(p)_(y) =k ₆−log(1+k ₅)−k ₇ ∇{tilde over (S)}(p)_(z)=atan2(k ₁(k ₂ −k ₀), k ₀ k ₁ ² +k ₂)  (61)

The symbols above are defined as:

$\begin{matrix} {{k_{0} = {{p}/{p_{0}}}}{k_{1} = {{{p_{1} - p_{0}}}/{p_{0}}}}{k_{2} = \sqrt{1 + k_{1}^{2} + k_{0}^{2}}}{k_{3} = {{\left( {k_{1}^{2} - 1} \right)\left( {k_{0}^{2} - 1} \right)} - 2}}{k_{4} = \sqrt{1 + k_{1}^{2}}}{k_{5} = \sqrt{1 + k_{0}^{2}}}{k_{6} = {\log\left( k_{0} \right)}}{k_{7} = {\left( {k_{6} - {\log\left( {k_{2} + k_{4}} \right)}} \right)/k_{4}}}} & (62) \end{matrix}$

APPENDIX 10

Doublet Fields

The doublet integral of Eq. (26) is given by Oosterom and Strackee [1983]. Below are the formula of the doublet panel field D, and its derivative ∇D, for a triangle defined by {p₀, p₁,p₂}, using the symbols of Eq. (64):

$\begin{matrix} {{{D(p)} = {{- 2}a\;\tan\; 2\left( {k_{1},k_{0}} \right)}}{{\nabla{D(p)}} = {{- 2}\frac{{k_{0}\overset{\rightarrow}{n}} - {k_{1}{\overset{\rightarrow}{k}}_{2}}}{k_{0}^{2} + k_{1}^{2}}}}} & (63) \end{matrix}$

The symbols above are defined as:

$\begin{matrix} {\mspace{79mu}{{\overset{\rightarrow}{n} = {\left( {p_{1} - p_{0}} \right) \times \left( {p_{2} - p_{0}} \right)}}\mspace{20mu}{{\overset{\rightarrow}{d}}_{i} = {p_{i} - p}}\mspace{20mu}{l_{i} = {{\overset{\rightarrow}{d}}_{i}}}\mspace{20mu}{k_{0} = {{l_{0}l_{1}l_{2}} + {l_{0}{{\overset{\rightarrow}{d}}_{1} \cdot {\overset{\rightarrow}{d}}_{2}}} + {l_{1}{{\overset{\rightarrow}{d}}_{2} \cdot {\overset{\rightarrow}{d}}_{0}}} + {l_{2}{{\overset{\rightarrow}{d}}_{0} \cdot {\overset{\rightarrow}{d}}_{1}}}}}\mspace{20mu}{k_{1} = {\left( {{\overset{\rightarrow}{d}}_{2} \times {\overset{\rightarrow}{d}}_{1}} \right) \cdot {\overset{\rightarrow}{d}}_{0}}}{{\overset{\rightarrow}{k}}_{2} = {{{- \left( {\frac{{l_{1}l_{2}} + {{\overset{\rightarrow}{d}}_{1} \cdot {\overset{\rightarrow}{d}}_{2}}}{l_{0}} + l_{1} + l_{2}} \right)}{\overset{\rightarrow}{d}}_{0}} - {\left( {\frac{{l_{0}l_{2}} + {{\overset{\rightarrow}{d}}_{2} \cdot {\overset{\rightarrow}{d}}_{0}}}{l_{1}} + l_{2} + l_{0}} \right){\overset{\rightarrow}{d}}_{1}} - {\left( {\frac{{l_{0}l_{1}} + {{\overset{\rightarrow}{d}}_{0} \cdot {\overset{\rightarrow}{d}}_{1}}}{l_{2}} + l_{0} + l_{1}} \right){\overset{\rightarrow}{d}}_{2}}}}}} & (64) \end{matrix}$ 

What is claimed is:
 1. A method of computer graphic image processing, wherein a computer system generates rendered image frames of incompressible gas corresponding to a camera view of a three-dimensional virtual space, the method comprising: generating a plurality of vorticles, each respective vorticle centered at a respective position in the virtual space and having a respective spatial size; computing advected field of the plurality of vorticles by solving a vorticity equation using a fast multipole method (FMM); dividing the virtual space into a plurality of concentric regions surrounding a position of a camera; defining a respective density voxel grid for each respective region of the plurality of concentric regions, each respective density voxel grid having a respective first voxel size that increases with increasing distance from the position of the camera; defining a respective velocity voxel grid for each respective region of the plurality of concentric regions, each respective velocity voxel grid having a respective second voxel size that increases with increasing distance from the position of the camera; adding a new density representing a smoke emitter, wherein the new density has a first distribution in a first region of the virtual space, wherein the first region overlaps with one or more density voxels in one or more regions of the plurality of concentric regions; activating and adding density to each of the one or more density voxels of the one or more regions that overlap with the first region; activating and computing velocity field at each velocity voxel of the one or more regions that overlaps with the active density voxels; moving the new density based on the velocity field of each active velocity voxel to obtain a second distribution of the new density in a second region of the virtual space for a next frame; activating and adding density to each density voxel that overlaps with the second region; and storing the density of each active density voxel and the velocity field of each active velocity voxel in a computer-readable medium as the next frame for display at a screen.
 2. The method of claim 1, wherein the respective second voxel size of each respective velocity voxel grid is greater than the respective first voxel size of the corresponding density voxel grid.
 3. The method of claim 1, wherein the plurality of concentric regions is defined by a plurality of concentric spheres, each respective region located between two consecutive spheres.
 4. The method of claim 1, wherein computing the advected field of the plurality of vorticles using the FMM comprises: building an octree of vorticles including a plurality octree levels, each respective octree level having a cell size proportional to 2^(−L), L being a level number of the respective octree level; storing each respective vorticle of the plurality of vorticles in a respective cell of a respective octree level having a cell size that is proportional to the spatial size of the respective vorticle; allocating near cells as a first cell containing the position of the camera and cells that are direct neighbors of the first cell, and far interacting cells as all other cells; and computing the advected field using the FMM by summing the vorticles stored in each respective far cell.
 5. The method of claim 4, wherein each respective vorticle is stored in the respective cell having the cell size of $2^{\frac{\log\mspace{11mu} r_{i}}{\log\mspace{11mu} 2}},$ r_(i) being the spatial size of the respective vorticle.
 6. The method of claim 4, further comprising: computing velocity field of the plurality of vorticles; and moving the plurality of vorticles to a next frame based on the velocity field using the octree.
 7. The method of claim 4, wherein the respective spatial size of each respective vorticle increases with increasing distance between the respective position of the respective vorticle and the position of the camera.
 8. The method of claim 1, further comprising: inputting an object defined by a boundary surface; dividing the boundary surface into a plurality of panels, each respective panel centered at a respective position and having a respective panel size; computing advected field at each respective panel using the FMM; computing a source panel coefficient and a doublet panel coefficient for each respective panel; and computing harmonic field by solving the vorticity equation using the FMM based on the source panel coefficients and the doublet panel coefficients of the plurality of panels.
 9. The method of claim 8, wherein computing the harmonic field using the FMM comprises: building an octree of panels including a plurality octree levels, each respective octree level having a cell size proportional to 2^(−L), L being a level number of the respective octree level; storing each respective panel of the plurality of panels in a respective cell of a respective octree level having a cell size that is proportional to the spatial size of the respective panel; allocating near cells as a first cell containing the position of the camera and cells that are direct neighbors of the first cell, and far interacting cells as all other cells; and computing the harmonic field using the FMM by summing the panels stored in each respective far cell.
 10. The method of claim 1, further comprising: stretching one or more vorticles of the plurality of vorticles by a stretching factor s; and unstretching the one or more vorticles while preserving an energy and enstrophy of each of the one or more vorticles.
 11. A computer product comprising a non-transitory computer readable medium storing a plurality of instructions that when executed control a computer system to generate rendered image frames of incompressible gas corresponding to a camera view of a three-dimensional virtual space, wherein the plurality of instructions comprises: generating a plurality of vorticles, each respective vorticle centered at a respective position in the virtual space and having a respective spatial size; computing advected field of the plurality of vorticles by solving a vorticity equation using a fast multipole method (FMM); dividing the virtual space into a plurality of concentric regions surrounding a position of a camera; defining a respective density voxel grid for each respective region of the plurality of concentric regions, each respective density voxel grid having a respective first voxel size that increases with increasing distance from the position of the camera; defining a respective velocity voxel grid for each respective region of the plurality of concentric regions, each respective velocity voxel grid having a respective second voxel size that increases with increasing distance from the position of the camera; adding a new density representing a smoke emitter, wherein the new density has a first distribution in a first region of the virtual space, wherein the first region overlaps with one or more regions of the plurality of concentric regions; activating and adding density to each density voxel of the one or more regions that overlaps with the first region; activating and computing velocity field at each velocity voxel of the one or more regions that overlaps with the active density voxels; moving the new density based on the velocity field of each active velocity voxel to obtain a second distribution of the new density in a second region of the virtual space for a next frame; activating and adding density to each density voxel that overlaps with the second region; and storing the density of each active density voxel and the velocity field of each active velocity voxel in a computer-readable medium as the next frame for display at a screen.
 12. The computer product of claim 11, wherein the respective second voxel size of each respective velocity voxel grid is greater than the respective first voxel size of the corresponding density voxel grid.
 13. The computer product of claim 11, wherein the plurality of concentric regions is defined by a plurality of concentric spheres, each respective region located between two consecutive spheres.
 14. The computer product of claim 11, wherein the instructions for computing the advected field of the plurality of vorticles using the FMM comprise: building an octree of vorticles including a plurality octree levels, each respective octree level having a cell size proportional to 2^(−L), L being a level number of the respective octree level; storing each respective vorticle of the plurality of vorticles in a respective cell of a respective octree level having a cell size that is proportional to the spatial size of the respective vorticle; allocating near cells as a first cell containing the position of the camera and cells that are direct neighbors of the first cell, and far interacting cells as all other cells; and computing the advected field using the FMM by summing the vorticles stored in each respective far cell.
 15. The computer product of claim 14, wherein each respective vorticle is stored in the respective cell having the cell size of $2^{\frac{\log\mspace{11mu} r_{i}}{\log\mspace{11mu} 2}},$ r_(i) being the spatial size of the respective vorticle.
 16. The computer product of claim 14, wherein the plurality of instructions further comprises: computing velocity field of the plurality of vorticles; and moving the plurality of vorticles to a next frame based on the velocity field using the octree.
 17. The computer product of claim 14, wherein the respective spatial size of each respective vorticle increases with increasing distance between the respective position of the respective vorticle and the position of the camera.
 18. The computer product of claim 11, wherein the plurality of instructions further comprises: inputting an object defined by a boundary surface; dividing the boundary surface into a plurality of panels, each respective panel centered at a respective position and having a respective panel size; computing advected field at each respective panel using the FMM; computing a source panel coefficient and a doublet panel coefficient for each respective panel; and computing harmonic field by solving the vorticity equation using the FMM based on the source panel coefficients and the doublet panel coefficients of the plurality of panels.
 19. The computer product of claim 18, wherein the instructions for computing the harmonic field using the FMM comprise: building an octree of panels including a plurality octree levels, each respective octree level having a cell size proportional to 2^(−L), L being a level number of the respective octree level; storing each respective panel of the plurality of panels in a respective cell of a respective octree level having a cell size that is proportional to the spatial size of the respective panel; allocating near cells as a first cell containing the position of the camera and cells that are direct neighbors of the first cell, and far interacting cells as all other cells; and computing the harmonic field using the FMM by summing the panels stored in each respective far cell.
 20. The computer product of claim 11, wherein the plurality of instructions further comprises: stretching one or more vorticles of the plurality of vorticles by a stretching factor s; and unstretching the one or more vorticles while preserving an energy and enstrophy of each of the one or more vorticles. 